From 05a1d64fbbe374dabb6572bb47d9a745464633bb Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 7 May 2020 11:33:20 +0200 Subject: VC vehicles just barely working now --- src/core/Streaming.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/core/Streaming.cpp') 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){ -- cgit v1.2.3