Skip to content

Commit

Permalink
- fixed fallback lookup for multipatch textures referencing themselve…
Browse files Browse the repository at this point in the history
…s as patch.

The code hadn't been properly updated to the new 3-layer texture system.
  • Loading branch information
coelckers committed Jun 9, 2020
1 parent af7c2fb commit 2d13dcf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/common/textures/multipatchtexturebuilder.cpp
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2d13dcf

Please sign in to comment.