aboutsummaryrefslogtreecommitdiff
path: root/src/common/Collision/Maps/MapTree.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-05 21:20:25 +0200
committerOvahlord <dreadkiller@gmx.de>2024-07-06 15:36:10 +0200
commitcaf4c02da82e868f7f77f4967d2cee2a5780828a (patch)
tree5c084c4301e0473f199712ba73056bb93ac8e7f3 /src/common/Collision/Maps/MapTree.h
parent5acd3085501fb7ad4ad76ccec4f727e20869cacd (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 (cherry picked from commit 35a2d49971984bcab96ac64fc52b30a9a4e06ce3)
Diffstat (limited to 'src/common/Collision/Maps/MapTree.h')
-rw-r--r--src/common/Collision/Maps/MapTree.h8
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: