mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-27 11:25:41 +00:00
fix
This commit is contained in:
parent
c11a20cb4f
commit
6065f5e52b
2 changed files with 5 additions and 5 deletions
|
@ -653,13 +653,16 @@ CCarCtrl::RemoveFromLoadedVehicleArray(int mi, int32 rating)
|
|||
while (LoadedCarsArray[rating][index] != -1) {
|
||||
if (LoadedCarsArray[rating][index] == mi)
|
||||
break;
|
||||
index++;
|
||||
}
|
||||
assert(LoadedCarsArray[rating][index] == mi);
|
||||
int32 freq = CarFreqArrays[rating][index];
|
||||
if (index > 0)
|
||||
freq -= CarFreqArrays[rating][index - 1];
|
||||
while (LoadedCarsArray[rating][index + 1] != -1) {
|
||||
LoadedCarsArray[rating][index] = LoadedCarsArray[rating][index + 1];
|
||||
CarFreqArrays[rating][index] = CarFreqArrays[rating][index + 1] - freq;
|
||||
index++;
|
||||
}
|
||||
--NumOfLoadedCarsOfRating[rating];
|
||||
}
|
||||
|
|
|
@ -1164,9 +1164,9 @@ found:
|
|||
}
|
||||
else{
|
||||
RemoveModel(id);
|
||||
CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)CModelInfo::GetModelInfo(modelId);
|
||||
CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
|
||||
if (pVehicleInfo->m_vehicleClass != -1)
|
||||
CCarCtrl::RemoveFromLoadedVehicleArray(modelId, pVehicleInfo->m_vehicleClass);
|
||||
CCarCtrl::RemoveFromLoadedVehicleArray(id, pVehicleInfo->m_vehicleClass);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1305,11 +1305,8 @@ CStreaming::StreamVehiclesAndPeds(void)
|
|||
mostRequestedRating = i;
|
||||
}
|
||||
}
|
||||
debug("selected %d with %d\n", mostRequestedRating, maxReq);
|
||||
model = CCarCtrl::ChooseCarModelToLoad(mostRequestedRating);
|
||||
debug("selected %d\n", model);
|
||||
if(!HasModelLoaded(model)){
|
||||
debug("requested %d\n", model);
|
||||
RequestModel(model, STREAMFLAGS_DEPENDENCY);
|
||||
timeBeforeNextLoad = 350;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue