- changed last commit to let the replacement take the original's place and add the old texture at the end with its name cleared.

This is to ensure that this won't break ranged animations but aside from that should produce the same end result.
This commit is contained in:
Christoph Oelckers 2018-12-20 18:20:25 +01:00
parent 120b950291
commit d140d767a4

View file

@ -468,10 +468,10 @@ void FTextureManager::ReplaceTexture (FTextureID picnum, FTexture *newtexture, b
newtexture->Name = oldtexture->Name;
newtexture->UseType = oldtexture->UseType;
// Add the new texture at the end of the texture list and clear the old one's name to ensure it won't be found anymore
// We cannot actually replace it because it may be referenced by some other texture.
Textures[index].Texture = newtexture;
newtexture->id = oldtexture->id;
oldtexture->Name = "";
AddTexture(newtexture);
AddTexture(oldtexture);
}
//==========================================================================