From 5d942db61d776f9ed604f3c44191ccf5091d47c8 Mon Sep 17 00:00:00 2001 From: MotoLegacy Date: Mon, 4 Mar 2024 17:32:51 -0500 Subject: [PATCH] Add support for __TB_empty->NULL redirection --- common/bspfile.cpp | 7 +++++++ common/cmdlib.h | 1 + 2 files changed, 8 insertions(+) diff --git a/common/bspfile.cpp b/common/bspfile.cpp index 7867a08..2599de7 100644 --- a/common/bspfile.cpp +++ b/common/bspfile.cpp @@ -1996,6 +1996,13 @@ char* GetTextureByNumber(int texturenumber) ofs = ((dmiptexlump_t*)g_dtexdata)->dataofs[info->miptex]; miptex = (miptex_t*)(&g_dtexdata[ofs]); + // cypress -- hacked-in support for __TB_empty + // just sorta replacing __TB_empty with null here, because + // ericw-tools does the same thing, and this is the best + // place to do it with the least amount of work required. + if (!strncasecmp(miptex->name, "__TB_empty", 10)) + return "null"; + return miptex->name; } diff --git a/common/cmdlib.h b/common/cmdlib.h index b61f312..9336e52 100644 --- a/common/cmdlib.h +++ b/common/cmdlib.h @@ -93,6 +93,7 @@ #define ZHLT_EMBEDLIGHTMAP // this feature requires HLRAD_TEXTURE and RIPENT_TEXTURE //--vluzacn #endif //#define ZHLT_HIDDENSOUNDTEXTURE //--vluzacn +#define ZHLT_TRENCHBROOMNULL_FIX //--cypress #define COMMON_HULLU // winding optimisations by hullu