1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-23 17:45:28 +00:00
This commit is contained in:
Nikolay Korolev 2020-05-28 17:21:00 +03:00
parent 9bcec54291
commit 111d23beab

View file

@ -120,14 +120,14 @@ CWorld::ClearExcitingStuffFromArea(const CVector &pos, float radius, bool bRemov
for(int32 i = 0; i < pedPool->GetSize(); i++) { for(int32 i = 0; i < pedPool->GetSize(); i++) {
CPed *pPed = pedPool->GetSlot(i); CPed *pPed = pedPool->GetSlot(i);
if(pPed && !pPed->IsPlayer() && pPed->CanBeDeleted() && if(pPed && !pPed->IsPlayer() && pPed->CanBeDeleted() &&
CVector2D(pPed->GetPosition() - pos).MagnitudeSqr() < radius) { CVector2D(pPed->GetPosition() - pos).MagnitudeSqr() < SQR(radius)) {
CPopulation::RemovePed(pPed); CPopulation::RemovePed(pPed);
} }
} }
CVehiclePool *VehiclePool = CPools::GetVehiclePool(); CVehiclePool *VehiclePool = CPools::GetVehiclePool();
for(int32 i = 0; i < VehiclePool->GetSize(); i++) { for(int32 i = 0; i < VehiclePool->GetSize(); i++) {
CVehicle *pVehicle = VehiclePool->GetSlot(i); CVehicle *pVehicle = VehiclePool->GetSlot(i);
if(pVehicle && CVector2D(pVehicle->GetPosition() - pos).MagnitudeSqr() < radius && if(pVehicle && CVector2D(pVehicle->GetPosition() - pos).MagnitudeSqr() < SQR(radius) &&
!pVehicle->bIsLocked && pVehicle->CanBeDeleted()) { !pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
if(pVehicle->pDriver) { if(pVehicle->pDriver) {
CPopulation::RemovePed(pVehicle->pDriver); CPopulation::RemovePed(pVehicle->pDriver);