- fixed: FMultiPatchTexture::MakeTexture was missing a range check for the

special colormap index.


SVN r1928 (trunk)
This commit is contained in:
Christoph Oelckers 2009-10-18 14:08:32 +00:00
commit 8390184839
5 changed files with 20 additions and 2 deletions

View file

@ -320,7 +320,7 @@ FTextureID FTextureManager::AddTexture (FTexture *texture)
int trans = Textures.Push (hasher);
Translation.Push (trans);
if (bucket >= 0) HashFirst[bucket] = trans;
return FTextureID(trans);
return (texture->id = FTextureID(trans));
}
//==========================================================================
@ -365,10 +365,15 @@ void FTextureManager::ReplaceTexture (FTextureID picnum, FTexture *newtexture, b
newtexture->UseType = oldtexture->UseType;
Textures[index].Texture = newtexture;
newtexture->id = oldtexture->id;
if (free)
{
delete oldtexture;
}
else
{
oldtexture->id.SetInvalid();
}
}
//==========================================================================