From b7ea4833232f0e24a0f4776080e1977a5d549f56 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Apr 2020 19:52:03 +0200 Subject: [PATCH] - fixed checkForHacks placement. --- src/common/textures/multipatchtexturebuilder.cpp | 4 +--- src/d_main.cpp | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/common/textures/multipatchtexturebuilder.cpp b/src/common/textures/multipatchtexturebuilder.cpp index 689330eb1..d95c681dc 100644 --- a/src/common/textures/multipatchtexturebuilder.cpp +++ b/src/common/textures/multipatchtexturebuilder.cpp @@ -843,8 +843,6 @@ void FMultipatchTextureBuilder::ResolvePatches(BuildInfo &buildinfo) i--; } } - - checkForHacks(buildinfo); } void FMultipatchTextureBuilder::ResolveAllPatches() @@ -891,6 +889,7 @@ void FMultipatchTextureBuilder::ResolveAllPatches() { // If this texture is just a wrapper around a single patch, we can simply // use that patch's image directly here. + checkForHacks(buildinfo); bool done = false; if (buildinfo.Parts.Size() == 1) @@ -912,7 +911,6 @@ void FMultipatchTextureBuilder::ResolveAllPatches() auto itex = new FImageTexture(img); AddImageToTexture(itex, buildinfo); } - BuiltTextures.Delete(i); donesomething = true; } diff --git a/src/d_main.cpp b/src/d_main.cpp index 1c9522951..da702fc67 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -112,6 +112,7 @@ #include "formats/multipatchtexture.h" #include "scriptutil.h" #include "v_palette.h" +#include "texturemanager.h" #ifdef __unix__ #include "i_system.h" // for SHARE_DIR @@ -2681,9 +2682,7 @@ static void CheckForHacks(BuildInfo& buildinfo) buildinfo.Parts.Size() == 1) { // This must alter the size of both the texture image and the game texture. - buildinfo.Height = buildinfo.Parts[0].TexImage->GetHeight(); - buildinfo.texture->GetTexture()->SetSize(buildinfo.texture->GetTexelWidth(), buildinfo.Height); - buildinfo.texture->SetSize(buildinfo.texture->GetTexelWidth(), buildinfo.Height); + buildinfo.Height = buildinfo.Parts[0].TexImage->GetImage()->GetHeight(); return; }