From 2d13dcfc81a99c501fb21ba08e5482dc71180b4a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 9 Jun 2020 23:18:55 +0200 Subject: [PATCH] - fixed fallback lookup for multipatch textures referencing themselves as patch. The code hadn't been properly updated to the new 3-layer texture system. --- src/common/textures/multipatchtexturebuilder.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/common/textures/multipatchtexturebuilder.cpp b/src/common/textures/multipatchtexturebuilder.cpp index d306c3bb24..2557d848c0 100644 --- a/src/common/textures/multipatchtexturebuilder.cpp +++ b/src/common/textures/multipatchtexturebuilder.cpp @@ -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(gtex->GetTexture()->GetImage())) { - auto gtex = TexMan.GetGameTexture(list[i]); - if (gtex && !dynamic_cast(gtex->GetTexture())) - { - texno = list[i]; - } + texno = list[i]; break; } }