mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-14 12:34:08 +00:00
Some CPool and CPools funcs, restoring original logic of pool lookup loops
This commit is contained in:
parent
2c81844c20
commit
5b1ffb0912
13 changed files with 147 additions and 51 deletions
|
@ -648,8 +648,7 @@ CCarCtrl::AddToCarArray(int32 id, int32 vehclass)
|
|||
void
|
||||
CCarCtrl::RemoveDistantCars()
|
||||
{
|
||||
uint32 i = CPools::GetVehiclePool()->GetSize();
|
||||
while (--i){
|
||||
for (int i = CPools::GetVehiclePool()->GetSize()-1; i >= 0; i--) {
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||
if (!pVehicle)
|
||||
continue;
|
||||
|
@ -733,8 +732,7 @@ int32
|
|||
CCarCtrl::CountCarsOfType(int32 mi)
|
||||
{
|
||||
int32 total = 0;
|
||||
uint32 i = CPools::GetVehiclePool()->GetSize();
|
||||
while (i--){
|
||||
for (int i = CPools::GetVehiclePool()->GetSize()-1; i >= 0; i--) {
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||
if (!pVehicle)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue