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/Models/GameObjectModel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/common/Collision/Models/GameObjectModel.cpp') diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp index 148ecff9066..65a530e7c0e 100644 --- a/src/common/Collision/Models/GameObjectModel.cpp +++ b/src/common/Collision/Models/GameObjectModel.cpp @@ -98,7 +98,7 @@ void LoadGameObjectModelList(std::string const& dataPath) GameObjectModel::~GameObjectModel() { if (iModel) - ((VMAP::VMapManager2*)VMAP::VMapFactory::createOrGetVMapManager())->releaseModelInstance(name); + ((VMAP::VMapManager2*)VMAP::VMapFactory::createOrGetVMapManager())->releaseModelInstance(iModel->GetName()); } bool GameObjectModel::initialize(std::unique_ptr modelOwner, std::string const& dataPath) @@ -120,7 +120,6 @@ bool GameObjectModel::initialize(std::unique_ptr model if (!iModel) return false; - name = it->second.name; iPos = modelOwner->GetPosition(); iScale = modelOwner->GetScale(); iInvScale = 1.f / iScale; -- cgit v1.2.3