- Fixed: The first texture in a TEXTURE1 lump, although invalid when used
elsewhere, must be usable as sky (see Requiem.wad's SKY3.) SVN r993 (trunk)
This commit is contained in:
parent
656d0b4ab5
commit
4434e322e2
6 changed files with 19 additions and 6 deletions
|
|
@ -125,6 +125,11 @@ int FTextureManager::CheckForTexture (const char *name, int usetype, BITFIELD fl
|
|||
{
|
||||
return i;
|
||||
}
|
||||
else if (tex->UseType == FTexture::TEX_FirstDefined && usetype == FTexture::TEX_Wall)
|
||||
{
|
||||
if (!(flags & TEXMAN_ReturnFirst)) return 0;
|
||||
else return i;
|
||||
}
|
||||
else if (tex->UseType == FTexture::TEX_Null && usetype == FTexture::TEX_Wall)
|
||||
{
|
||||
// We found a NULL texture on a wall -> return 0
|
||||
|
|
@ -147,7 +152,11 @@ 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 (firstfound != -1 && firsttype == FTexture::TEX_Null) return 0;
|
||||
if (firstfound != -1)
|
||||
{
|
||||
if (firsttype == FTexture::TEX_Null) return 0;
|
||||
if (firsttype == FTexture::TEX_FirstDefined && !(flags & TEXMAN_ReturnFirst)) return 0;
|
||||
}
|
||||
return firstfound;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue