diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-07-05 21:20:25 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-07-05 21:20:25 +0200 |
commit | 35a2d49971984bcab96ac64fc52b30a9a4e06ce3 (patch) | |
tree | 328593a0a5d6eea88e692cddfa5fac2b786474fb /src/common/Collision/Maps/MapTree.h | |
parent | 5dbb6b043f8e66a3b163e4275dc8ec8ce22ce096 (diff) |
Core/Vmaps: Optimize loading vmaps
* Changed spawn id to BIH tree index mapping from generated on load to baked in tile files
* Remove map holding model load counts and moved that to ModelInstance instead
Diffstat (limited to 'src/common/Collision/Maps/MapTree.h')
-rw-r--r-- | src/common/Collision/Maps/MapTree.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/common/Collision/Maps/MapTree.h b/src/common/Collision/Maps/MapTree.h index b39eb62f1bd..4c088a7bad2 100644 --- a/src/common/Collision/Maps/MapTree.h +++ b/src/common/Collision/Maps/MapTree.h @@ -48,21 +48,15 @@ namespace VMAP class TC_COMMON_API StaticMapTree { typedef std::unordered_map<uint32, bool> loadedTileMap; - typedef std::unordered_map<uint32, uint32> loadedSpawnMap; private: uint32 iMapID; BIH iTree; - ModelInstance* iTreeValues; // the tree entries - uint32 iNTreeValues; - std::unordered_map<uint32, uint32> iSpawnIndices; + std::vector<ModelInstance> iTreeValues; // the tree entries // Store all the map tile idents that are loaded for that map // some maps are not splitted into tiles and we have to make sure, not removing the map before all tiles are removed // empty tiles have no tile file, hence map with bool instead of just a set (consistency check) loadedTileMap iLoadedTiles; - std::vector<std::pair<int32, int32>> iLoadedPrimaryTiles; - // stores <tree_index, reference_count> to invalidate tree values, unload map, and to be able to report errors - loadedSpawnMap iLoadedSpawns; std::string iBasePath; private: |