From bcff04e76f16542299ecde9bba67a8c5169ab6db Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 19 Dec 2018 09:12:58 +0100 Subject: [PATCH] - fixed: The Heretic sky height hack needs to be stored in the already created texture object as well. --- src/textures/multipatchtexturebuilder.cpp | 2 ++ src/textures/textures.h | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/textures/multipatchtexturebuilder.cpp b/src/textures/multipatchtexturebuilder.cpp index 2ec06d0e9..7be8a69e5 100644 --- a/src/textures/multipatchtexturebuilder.cpp +++ b/src/textures/multipatchtexturebuilder.cpp @@ -797,6 +797,7 @@ void FMultipatchTextureBuilder::CheckForHacks(BuildInfo &buildinfo) buildinfo.Height == 128) { buildinfo.Height = 200; + buildinfo.tex->SetSize(buildinfo.tex->Width, 200); return; } @@ -924,6 +925,7 @@ void FMultipatchTextureBuilder::ResolveAllPatches() while (BuiltTextures.Size() > 0) { bool donesomething = false; + for (unsigned i = 0; i < BuiltTextures.Size(); i++) { auto &buildinfo = BuiltTextures[i]; diff --git a/src/textures/textures.h b/src/textures/textures.h index 9fc9341b2..a91be051b 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -432,14 +432,11 @@ protected: float shaderspeed = 1.f; int shaderindex = 0; - // This is only legal for the null texture! + // This is only used for the null texture and for Heretic's skies. void SetSize(int w, int h) { - if (UseType == ETextureType::Null) - { - Width = w; - Height = h; - } + Width = w; + Height = h; } void SetSpeed(float fac) { shaderspeed = fac; }