- added some 'overrides' and block 'forcelookup' for script access to textures.

This commit is contained in:
Christoph Oelckers 2020-09-27 10:45:45 +02:00
commit 31628a70c8
2 changed files with 20 additions and 19 deletions

View file

@ -78,7 +78,8 @@ DEFINE_ACTION_FUNCTION(_TexMan, GetName)
static int CheckForTexture(const FString& name, int type, int flags)
{
return TexMan.CheckForTexture(name, static_cast<ETextureType>(type), flags).GetIndex();
// ForceLookup is intentionally blocked here, this flag is for internal use only.
return TexMan.CheckForTexture(name, static_cast<ETextureType>(type), (flags & ~FTextureManager::TEXMAN_ForceLookup)).GetIndex();
}
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, CheckForTexture, CheckForTexture)