diff options
author | aap <aap@papnet.eu> | 2021-08-24 19:16:17 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-08-24 19:16:17 +0200 |
commit | 5f7de20cdebe36759d6fe06ff8aabc91359771f0 (patch) | |
tree | 44db44eef4a7c41770738fc8c493de8eb3570cdb /src/core | |
parent | CModelInfo done (diff) | |
download | re3-5f7de20cdebe36759d6fe06ff8aabc91359771f0.tar re3-5f7de20cdebe36759d6fe06ff8aabc91359771f0.tar.gz re3-5f7de20cdebe36759d6fe06ff8aabc91359771f0.tar.bz2 re3-5f7de20cdebe36759d6fe06ff8aabc91359771f0.tar.lz re3-5f7de20cdebe36759d6fe06ff8aabc91359771f0.tar.xz re3-5f7de20cdebe36759d6fe06ff8aabc91359771f0.tar.zst re3-5f7de20cdebe36759d6fe06ff8aabc91359771f0.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/AnimViewer.cpp | 8 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp index dc9b44cb..e3e19cd2 100644 --- a/src/core/AnimViewer.cpp +++ b/src/core/AnimViewer.cpp @@ -92,7 +92,7 @@ CAnimViewer::Initialise(void) { CFileLoader::LoadLevel("DATA\\DEFAULT.DAT"); CFileLoader::LoadLevel("DATA\\ANIMVIEWER.DAT"); CStreaming::Init(); - for(int i = 0; i < MODELINFOSIZE; i++) + for(int i = 0; i < CModelInfo::GetNumModelInfos(); i++) if(CModelInfo::GetModelInfo(i)) CModelInfo::GetModelInfo(i)->ConvertAnimFileIndex(); CStreaming::LoadInitialPeds(); @@ -166,7 +166,7 @@ LastPedModelId(int modelId) { CBaseModelInfo *model; for(;;){ - assert(modelId < MODELINFOSIZE); + assert(modelId < CModelInfo::GetNumModelInfos()); model = CModelInfo::GetModelInfo(modelId); if (model && model->GetModelType() == MITYPE_PED) break; @@ -180,7 +180,7 @@ FirstCarModelId(int modelId) { CBaseModelInfo *model; for(;;){ - assert(modelId < MODELINFOSIZE); + assert(modelId < CModelInfo::GetNumModelInfos()); model = CModelInfo::GetModelInfo(modelId); if (model && model->GetModelType() == MITYPE_VEHICLE) break; @@ -200,7 +200,7 @@ NextModelId(int modelId, int wantedChange) while(tryCount != 0) { modelId += wantedChange; - if (modelId < 0 || modelId >= MODELINFOSIZE) { + if (modelId < 0 || modelId >= CModelInfo::GetNumModelInfos()) { tryCount--; wantedChange = -wantedChange; } else if (modelId != 5 && modelId != 6 && modelId != 405) { diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 03b78392..f62ff179 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -180,7 +180,7 @@ CStreaming::Init2(void) // init stream info, mark things that are already loaded - for(i = 0; i < MODELINFOSIZE; i++){ + for(i = 0; i < CModelInfo::GetNumModelInfos(); i++){ CBaseModelInfo *mi = CModelInfo::GetModelInfo(i); if(mi && mi->GetRwObject()){ ms_aInfoForModel[i].m_loadState = STREAMSTATE_LOADED; |