From 133ee77fc5e0a2c8433f60fbf6f9970772073daa Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 20 Apr 2022 01:31:26 -0600 Subject: [PATCH] testqbsp: fix textures not loading in tests --- include/qbsp/map.hh | 1 + qbsp/qbsp.cc | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/qbsp/map.hh b/include/qbsp/map.hh index 64eb54bd..43782024 100644 --- a/include/qbsp/map.hh +++ b/include/qbsp/map.hh @@ -148,6 +148,7 @@ struct mapdata_t // misc int start_spots = 0; + bool wadlist_tried_loading = false; // helpers const std::string &miptexTextureName(int mt) const { return miptex.at(mt).name; } diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index cbf27b78..b959b0a4 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -1041,14 +1041,12 @@ static void CreateHulls(void) } } -static bool wadlist_tried_loading = false; - void EnsureTexturesLoaded() { - if (wadlist_tried_loading) + if (map.wadlist_tried_loading) return; - wadlist_tried_loading = true; + map.wadlist_tried_loading = true; const char *wadstring = ValueForKey(map.world_entity(), "_wad"); if (!wadstring[0])