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])