From bb8f22ed2013f8cb6b9d61c738f2ebd96b83722f Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 24 Apr 2021 23:28:42 +0200 Subject: Core/Vmaps: Reduce memory used by vmaps (and their size, slightly) --- src/common/Collision/Maps/MapTree.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/common/Collision/Maps/MapTree.cpp') diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp index 7249a0cf1a2..d72d555caab 100644 --- a/src/common/Collision/Maps/MapTree.cpp +++ b/src/common/Collision/Maps/MapTree.cpp @@ -16,17 +16,17 @@ */ #include "MapTree.h" -#include "ModelInstance.h" -#include "VMapManager2.h" -#include "VMapDefinitions.h" -#include "Log.h" #include "Errors.h" +#include "Log.h" #include "Metric.h" - -#include -#include +#include "ModelInstance.h" +#include "VMapDefinitions.h" +#include "VMapManager2.h" +#include "WorldModel.h" #include #include +#include +#include using G3D::Vector3; @@ -355,7 +355,7 @@ namespace VMAP { iTreeValues[i->first].setUnloaded(); for (uint32 refCount = 0; refCount < i->second; ++refCount) - vm->releaseModelInstance(iTreeValues[i->first].name); + vm->releaseModelInstance(iTreeValues[i->first].getWorldModel()->GetName()); } iLoadedSpawns.clear(); iLoadedTiles.clear(); -- cgit v1.2.3