testqbsp: fix textures not loading in tests

This commit is contained in:
Eric Wasylishen 2022-04-20 01:31:26 -06:00
parent 97692738c4
commit 133ee77fc5
2 changed files with 3 additions and 4 deletions

View File

@ -148,6 +148,7 @@ struct mapdata_t
// misc // misc
int start_spots = 0; int start_spots = 0;
bool wadlist_tried_loading = false;
// helpers // helpers
const std::string &miptexTextureName(int mt) const { return miptex.at(mt).name; } const std::string &miptexTextureName(int mt) const { return miptex.at(mt).name; }

View File

@ -1041,14 +1041,12 @@ static void CreateHulls(void)
} }
} }
static bool wadlist_tried_loading = false;
void EnsureTexturesLoaded() void EnsureTexturesLoaded()
{ {
if (wadlist_tried_loading) if (map.wadlist_tried_loading)
return; return;
wadlist_tried_loading = true; map.wadlist_tried_loading = true;
const char *wadstring = ValueForKey(map.world_entity(), "_wad"); const char *wadstring = ValueForKey(map.world_entity(), "_wad");
if (!wadstring[0]) if (!wadstring[0])