From 015921522db77273d00b12a08d7c6114f07d0071 Mon Sep 17 00:00:00 2001 From: majestic Date: Sun, 14 Jun 2020 05:57:27 -0700 Subject: fixed condition in CBoat::ProcessControl and changed enum --- src/core/Streaming.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'src/core/Streaming.cpp') diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 985b28c9..d560a695 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1554,19 +1554,32 @@ CStreaming::RemoveCurrentZonesModels(void) { int i; - if(ms_currentPedGrp != -1) - for(i = 0; i < NUMMODELSPERPEDGROUP; i++){ - if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1) + if (ms_currentPedGrp != -1) + for (i = 0; i < NUMMODELSPERPEDGROUP; i++) { + if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1) break; - if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != MI_MALE01) + if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != MI_MALE01) { SetModelIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); + SetModelTxdIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); + } } - for(i = 0; i < NUM_GANGS; i++){ - SetModelIsDeletable(CGangs::GetGangPedModel1(i)); - SetModelIsDeletable(CGangs::GetGangPedModel2(i)); - if(CGangs::GetGangVehicleModel(i) != -1) + CStreaming::RequestModel(MI_MALE01, STREAMFLAGS_DONT_REMOVE); + CStreaming::RequestModel(MI_TAXI_D, STREAMFLAGS_DONT_REMOVE); + + for (i = 0; i < NUM_GANGS; i++) { + if (CGangs::GetGangPedModel1(i) != -1) { + SetModelIsDeletable(CGangs::GetGangPedModel1(i)); + SetModelTxdIsDeletable(CGangs::GetGangPedModel1(i)); + } + if (CGangs::GetGangPedModel2(i) != -1) { + SetModelIsDeletable(CGangs::GetGangPedModel2(i)); + SetModelTxdIsDeletable(CGangs::GetGangPedModel2(i)); + } + if (CGangs::GetGangVehicleModel(i) != -1) { SetModelIsDeletable(CGangs::GetGangVehicleModel(i)); + SetModelTxdIsDeletable(CGangs::GetGangVehicleModel(i)); + } } ms_currentPedGrp = -1; -- cgit v1.2.3