Don't free replaced textures that are used as patches.

- Fixed: If a part of a multipatch texture is replaced by a HIRESTEX
  version, the original patch must not be deleted, since the multipatch
  texture still needs it for compositing.
This commit is contained in:
Randy Heit 2014-02-24 19:01:36 -06:00
commit 1d4f4b25d7
4 changed files with 7 additions and 4 deletions

View file

@ -428,7 +428,7 @@ void FTextureManager::ReplaceTexture (FTextureID picnum, FTexture *newtexture, b
Textures[index].Texture = newtexture;
newtexture->id = oldtexture->id;
if (free)
if (free && !oldtexture->bKeepAround)
{
delete oldtexture;
}