- set all texture IDs after finishing the initial texture manager initialization.

As it turned out, not all textures have a valid ID at that point so it needs to be redone.
This commit is contained in:
Christoph Oelckers 2020-04-19 21:07:57 +02:00
parent b7ea483323
commit f296660266

View file

@ -1184,6 +1184,13 @@ void FTextureManager::Init(void (*progressFunc_)(), void (*checkForHacks)(BuildI
glPart = TexMan.CheckForTexture("glstuff/glpart.png", ETextureType::MiscPatch);
mirrorTexture = TexMan.CheckForTexture("glstuff/mirror.png", ETextureType::MiscPatch);
AddLocalizedVariants();
// Make sure all ID's are correct by resetting them here to the proper index.
for (unsigned int i = 0, count = Textures.Size(); i < count; ++i)
{
Textures[i].Texture->SetID(i);
}
}
//==========================================================================