fix: memory leak, not unloading the map

This commit is contained in:
2024-01-04 20:05:57 +01:00
parent 21f0b0d195
commit bc799ef31a

View File

@@ -94,6 +94,8 @@ void Draw() {
if (map_name[0] == '\0')
return;
if (std::string(map_name) != map_name_old || !parsed_map) {
if (parsed_map)
_bsp_parser.unload_map();
parsed_map = _bsp_parser.load_map(std::string(Game::path) + std::string("cstrike\\maps"), map_name);
map_name_old = std::string(map_name);
}