- Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture

it should always return 0, not the actual texture's index.


SVN r979 (trunk)
This commit is contained in:
Christoph Oelckers 2008-05-17 23:41:51 +00:00
parent 7949f6d35f
commit b8c21495d5
2 changed files with 9 additions and 0 deletions

View file

@ -1,4 +1,6 @@
May 17, 2008 (Changes by Graf Zahl)
- Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture
it should always return 0, not the actual texture's index.
- Fixed coordinate checks for objects on 3DMidtex lines.
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as

View file

@ -125,6 +125,11 @@ int FTextureManager::CheckForTexture (const char *name, int usetype, BITFIELD fl
{
return i;
}
else if (tex->UseType == FTexture::TEX_Null && usetype == FTexture::TEX_Wall)
{
// We found a NULL texture on a wall -> return 0
return 0;
}
else
{
if (firsttype == FTexture::TEX_Null ||
@ -141,6 +146,8 @@ int FTextureManager::CheckForTexture (const char *name, int usetype, BITFIELD fl
if ((flags & TEXMAN_TryAny) && usetype != FTexture::TEX_Any)
{
// Never return the index of NULL textures.
if (firsttype == FTexture::TEX_Null) return 0;
return firstfound;
}