diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-01-21 08:47:24 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-01-21 08:47:24 +0100 |
commit | 77515f04e0cbb23029563017b47def5f2b9d0e4a (patch) | |
tree | 9581f7371b37f886e13beb06019fbb8516a28756 /src/modelinfo | |
parent | Refactor CCullZone::CalcDistToCullZoneSquared (diff) | |
download | re3-77515f04e0cbb23029563017b47def5f2b9d0e4a.tar re3-77515f04e0cbb23029563017b47def5f2b9d0e4a.tar.gz re3-77515f04e0cbb23029563017b47def5f2b9d0e4a.tar.bz2 re3-77515f04e0cbb23029563017b47def5f2b9d0e4a.tar.lz re3-77515f04e0cbb23029563017b47def5f2b9d0e4a.tar.xz re3-77515f04e0cbb23029563017b47def5f2b9d0e4a.tar.zst re3-77515f04e0cbb23029563017b47def5f2b9d0e4a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/modelinfo/ModelInfo.cpp | 10 | ||||
-rw-r--r-- | src/modelinfo/ModelInfo.h | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp index fdde699b..c41320e2 100644 --- a/src/modelinfo/ModelInfo.cpp +++ b/src/modelinfo/ModelInfo.cpp @@ -121,7 +121,7 @@ CModelInfo::AddMloModel(int id) CMloModelInfo *modelinfo; modelinfo = CModelInfo::ms_mloModelStore.alloc(); CModelInfo::ms_modelInfoPtrs[id] = modelinfo; - modelinfo->m_clump = 0; + modelinfo->m_clump = nil; modelinfo->firstInstance = 0; modelinfo->lastInstance = 0; return modelinfo; @@ -218,13 +218,19 @@ CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level) } } - CStore<CInstance, MLOINSTANCESIZE>* CModelInfo::GetMloInstanceStore() { return &CModelInfo::ms_mloInstanceStore; } +void +CModelInfo::ConstructMloClumps() +{ + for (int i = 0; i < ms_mloModelStore.allocPtr; i++) + ms_mloModelStore.store[i].ConstructClump(); +} + STARTPATCHES InjectHook(0x50B310, CModelInfo::Initialise, PATCH_JUMP); InjectHook(0x50B5B0, CModelInfo::ShutDown, PATCH_JUMP); diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h index 1a295264..3835117e 100644 --- a/src/modelinfo/ModelInfo.h +++ b/src/modelinfo/ModelInfo.h @@ -46,4 +46,5 @@ public: static bool IsBikeModel(int32 id); static void RemoveColModelsFromOtherLevels(eLevelName level); static CStore<CInstance, MLOINSTANCESIZE>* CModelInfo::GetMloInstanceStore(); + static void ConstructMloClumps(); }; |