summaryrefslogtreecommitdiffstats
path: root/src/core/Streaming.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-07 15:59:40 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-07 15:59:40 +0200
commit5780b4503eb7172a1beee05de9513374306c26ec (patch)
tree71503475e494e238d9fcb725a23f8f75e8150ea7 /src/core/Streaming.cpp
parentcar control and friends (diff)
parentMerge branch 'miami' of github.com:GTAmodding/re3 into miami (diff)
downloadre3-5780b4503eb7172a1beee05de9513374306c26ec.tar
re3-5780b4503eb7172a1beee05de9513374306c26ec.tar.gz
re3-5780b4503eb7172a1beee05de9513374306c26ec.tar.bz2
re3-5780b4503eb7172a1beee05de9513374306c26ec.tar.lz
re3-5780b4503eb7172a1beee05de9513374306c26ec.tar.xz
re3-5780b4503eb7172a1beee05de9513374306c26ec.tar.zst
re3-5780b4503eb7172a1beee05de9513374306c26ec.zip
Diffstat (limited to '')
-rw-r--r--src/core/Streaming.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index 54d34848..05b0c1f9 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -1285,8 +1285,11 @@ CStreaming::StreamVehiclesAndPeds(void)
else if(ms_numVehiclesLoaded <= desiredNumVehiclesLoaded){
for(i = 1; i <= 10; i++){
model = CCarCtrl::ChooseCarModel(modelQualityClass);
+// TODO(MIAMI): check this
+if(model < 0)
+ continue;
modelQualityClass++;
- if(modelQualityClass >= NUM_VEHICLE_CLASSES)
+ if(modelQualityClass >= CCarCtrl::TOTAL_CUSTOM_CLASSES)
modelQualityClass = 0;
// check if we want to load this model
@@ -1374,6 +1377,10 @@ CStreaming::StreamZoneModels(const CVector &pos)
ms_loadedGangs &= ~bit;
}
+// TODO(MIAMI): check this
+if(CGangs::GetGangInfo(i)->m_nVehicleMI < 0)
+ continue;
+
if(gangCarsToLoad & bit && (ms_loadedGangCars & bit) == 0){
RequestModel(CGangs::GetGangInfo(i)->m_nVehicleMI, STREAMFLAGS_DONT_REMOVE);
}else if((gangCarsToLoad & bit) == 0 && ms_loadedGangCars & bit){