Core/Vmaps: Reduce memory used by vmaps (and their size, slightly)

This commit is contained in:
Shauren
2021-04-24 23:28:42 +02:00
parent 4e00cb7c15
commit bb8f22ed20
12 changed files with 80 additions and 71 deletions

View File

@@ -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<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath)
@@ -120,7 +120,6 @@ bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> model
if (!iModel)
return false;
name = it->second.name;
iPos = modelOwner->GetPosition();
iScale = modelOwner->GetScale();
iInvScale = 1.f / iScale;