From 2fd1276d28fa1d55e9f678b17fae6bd6a5bd59b4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 3 Feb 2019 08:59:37 +0100 Subject: [PATCH] - fixed: Instead of mapping Hexen's BLANK texture to the null texture, make its actual use type that of a null texture. The software renderer does not have any safeguards against such a mapping and crashes on it. This code was a quick hack from ancient times from when ZDoom did not have robust texture management and some recent changes ran afoul of this very special exception. --- src/textures/texturemanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index 1c535f4df..27dc4d696 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -1051,13 +1051,14 @@ void FTextureManager::Init() // The Hexen scripts use BLANK as a blank texture, even though it's really not. // I guess the Doom renderer must have clipped away the line at the bottom of - // the texture so it wasn't visible. I'll just map it to 0, so it really is blank. + // the texture so it wasn't visible. Change its use type to a blank null texture to really make it blank. if (gameinfo.gametype == GAME_Hexen) { FTextureID tex = CheckForTexture ("BLANK", ETextureType::Wall, false); if (tex.Exists()) { - SetTranslation (tex, 0); + auto texture = GetTexture(tex, false); + texture->UseType = ETextureType::Null; } }