- fixed fallback lookup for multipatch textures referencing themselves as patch.

The code hadn't been properly updated to the new 3-layer texture system.
This commit is contained in:
Christoph Oelckers 2020-06-09 23:18:55 +02:00
parent af7c2fb4e9
commit 2d13dcfc81

View file

@ -779,13 +779,10 @@ void FMultipatchTextureBuilder::ResolvePatches(BuildInfo &buildinfo)
TexMan.ListTextures(buildinfo.Inits[i].TexName, list, true);
for (int i = list.Size() - 1; i >= 0; i--)
{
if (list[i] != buildinfo.texture->GetID())
auto gtex = TexMan.GetGameTexture(list[i]);
if (gtex && gtex != buildinfo.texture && gtex->GetTexture() && gtex->GetTexture()->GetImage() && !dynamic_cast<FMultiPatchTexture*>(gtex->GetTexture()->GetImage()))
{
auto gtex = TexMan.GetGameTexture(list[i]);
if (gtex && !dynamic_cast<FMultiPatchTexture*>(gtex->GetTexture()))
{
texno = list[i];
}
texno = list[i];
break;
}
}