- added a 'listall' option to FTextureManager::ListTextures, so that the multipatchtexture lookup can find multiple older versions with the same use type.
This fixes an issue with DUMP 2 which looked for patches of the same name as the texture currently being defined and where the patches had the same use type as the composite texture. The function as implemented would only find the newly added composite and print an error.
This commit is contained in:
parent
316e3395ad
commit
28fefdabc7
3 changed files with 10 additions and 7 deletions
|
|
@ -267,7 +267,7 @@ FTextureID FTextureManager::CheckForTexture (const char *name, int usetype, BITF
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int FTextureManager::ListTextures (const char *name, TArray<FTextureID> &list)
|
||||
int FTextureManager::ListTextures (const char *name, TArray<FTextureID> &list, bool listall)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -293,11 +293,14 @@ int FTextureManager::ListTextures (const char *name, TArray<FTextureID> &list)
|
|||
// NULL textures must be ignored.
|
||||
if (tex->UseType!=FTexture::TEX_Null)
|
||||
{
|
||||
unsigned int j;
|
||||
for(j = 0; j < list.Size(); j++)
|
||||
unsigned int j = list.Size();
|
||||
if (!listall)
|
||||
{
|
||||
// Check for overriding definitions from newer WADs
|
||||
if (Textures[list[j].GetIndex()].Texture->UseType == tex->UseType) break;
|
||||
for (j = 0; j < list.Size(); j++)
|
||||
{
|
||||
// Check for overriding definitions from newer WADs
|
||||
if (Textures[list[j].GetIndex()].Texture->UseType == tex->UseType) break;
|
||||
}
|
||||
}
|
||||
if (j==list.Size()) list.Push(FTextureID(i));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue