1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-05 12:25:54 +00:00
This commit is contained in:
Nikolay Korolev 2020-05-08 17:05:54 +03:00
parent c11a20cb4f
commit 6065f5e52b
2 changed files with 5 additions and 5 deletions

View file

@ -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];
}

View file

@ -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;
}