summaryrefslogtreecommitdiffstats
path: root/src/core/Streaming.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-07 11:33:20 +0200
committeraap <aap@papnet.eu>2020-05-07 11:33:20 +0200
commit05a1d64fbbe374dabb6572bb47d9a745464633bb (patch)
treee56b03fbb2c768324a4b540645eac2dc8c5bdf08 /src/core/Streaming.cpp
parentchanged default ID ranges. old default.ide incompatible now (diff)
downloadre3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.gz
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.bz2
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.lz
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.xz
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.tar.zst
re3-05a1d64fbbe374dabb6572bb47d9a745464633bb.zip
Diffstat (limited to 'src/core/Streaming.cpp')
-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){