Guard __TB_empty behind ZHLT_TRENCHBROOMNULL_FIX

This commit is contained in:
MotoLegacy 2024-03-04 17:33:54 -05:00
parent 5d942db61d
commit 0ba7b25090

View file

@ -1996,12 +1996,14 @@ char* GetTextureByNumber(int texturenumber)
ofs = ((dmiptexlump_t*)g_dtexdata)->dataofs[info->miptex]; ofs = ((dmiptexlump_t*)g_dtexdata)->dataofs[info->miptex];
miptex = (miptex_t*)(&g_dtexdata[ofs]); miptex = (miptex_t*)(&g_dtexdata[ofs]);
#ifdef ZHLT_TRENCHBROOMNULL_FIX
// cypress -- hacked-in support for __TB_empty // cypress -- hacked-in support for __TB_empty
// just sorta replacing __TB_empty with null here, because // just sorta replacing __TB_empty with null here, because
// ericw-tools does the same thing, and this is the best // ericw-tools does the same thing, and this is the best
// place to do it with the least amount of work required. // place to do it with the least amount of work required.
if (!strncasecmp(miptex->name, "__TB_empty", 10)) if (!strncasecmp(miptex->name, "__TB_empty", 10))
return "null"; return "null";
#endif
return miptex->name; return miptex->name;
} }