summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-04-13 14:36:05 +0200
committerGitHub <noreply@github.com>2020-04-13 14:36:05 +0200
commite2fb0578b53e8fac394d82a1d599e6b3ee81acc8 (patch)
tree4d7fd2a212e75c52f9adc92602a8411bbd7905ec /src/modelinfo
parentFix compilation error (diff)
parentCFileLoader last funcs and Frontend cleanup (diff)
downloadre3-e2fb0578b53e8fac394d82a1d599e6b3ee81acc8.tar
re3-e2fb0578b53e8fac394d82a1d599e6b3ee81acc8.tar.gz
re3-e2fb0578b53e8fac394d82a1d599e6b3ee81acc8.tar.bz2
re3-e2fb0578b53e8fac394d82a1d599e6b3ee81acc8.tar.lz
re3-e2fb0578b53e8fac394d82a1d599e6b3ee81acc8.tar.xz
re3-e2fb0578b53e8fac394d82a1d599e6b3ee81acc8.tar.zst
re3-e2fb0578b53e8fac394d82a1d599e6b3ee81acc8.zip
Diffstat (limited to 'src/modelinfo')
-rw-r--r--src/modelinfo/ModelInfo.cpp17
-rw-r--r--src/modelinfo/ModelInfo.h3
2 files changed, 13 insertions, 7 deletions
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index d956abaa..b6a95992 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -234,12 +234,6 @@ CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level)
}
}
-CStore<CInstance, MLOINSTANCESIZE>&
-CModelInfo::GetMloInstanceStore()
-{
- return CModelInfo::ms_mloInstanceStore;
-}
-
void
CModelInfo::ConstructMloClumps()
{
@@ -247,6 +241,17 @@ CModelInfo::ConstructMloClumps()
ms_mloModelStore.store[i].ConstructClump();
}
+void
+CModelInfo::ReInit2dEffects()
+{
+ ms_2dEffectStore.clear();
+
+ for (int i = 0; i < MODELINFOSIZE; i++) {
+ if (ms_modelInfoPtrs[i])
+ ms_modelInfoPtrs[i]->Init2dEffects();
+ }
+}
+
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 13756ddf..e6dec1d8 100644
--- a/src/modelinfo/ModelInfo.h
+++ b/src/modelinfo/ModelInfo.h
@@ -36,7 +36,7 @@ public:
static CVehicleModelInfo *AddVehicleModel(int id);
static CStore<C2dEffect, TWODFXSIZE> &Get2dEffectStore(void) { return ms_2dEffectStore; }
- static CStore<CInstance, MLOINSTANCESIZE> &GetMloInstanceStore();
+ static CStore<CInstance, MLOINSTANCESIZE> &GetMloInstanceStore(void) { return ms_mloInstanceStore; }
static CBaseModelInfo *GetModelInfo(const char *name, int *id);
static CBaseModelInfo *GetModelInfo(int id){
@@ -47,4 +47,5 @@ public:
static bool IsBikeModel(int32 id);
static void RemoveColModelsFromOtherLevels(eLevelName level);
static void ConstructMloClumps();
+ static void ReInit2dEffects();
};