diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-05-29 19:29:52 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-05-29 19:29:52 +0200 |
commit | 64382445406ec2ea7975f6729d4068d954e0735d (patch) | |
tree | fac5236294451b5052f337c21113e32f17338218 | |
parent | frontend options fix (diff) | |
parent | Merge pull request #604 from erorcun/master (diff) | |
download | re3-64382445406ec2ea7975f6729d4068d954e0735d.tar re3-64382445406ec2ea7975f6729d4068d954e0735d.tar.gz re3-64382445406ec2ea7975f6729d4068d954e0735d.tar.bz2 re3-64382445406ec2ea7975f6729d4068d954e0735d.tar.lz re3-64382445406ec2ea7975f6729d4068d954e0735d.tar.xz re3-64382445406ec2ea7975f6729d4068d954e0735d.tar.zst re3-64382445406ec2ea7975f6729d4068d954e0735d.zip |
-rw-r--r-- | src/core/World.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp index 39681428..c3633d77 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -120,14 +120,14 @@ CWorld::ClearExcitingStuffFromArea(const CVector &pos, float radius, bool bRemov for(int32 i = 0; i < pedPool->GetSize(); i++) { CPed *pPed = pedPool->GetSlot(i); if(pPed && !pPed->IsPlayer() && pPed->CanBeDeleted() && - CVector2D(pPed->GetPosition() - pos).MagnitudeSqr() < radius) { + CVector2D(pPed->GetPosition() - pos).MagnitudeSqr() < SQR(radius)) { CPopulation::RemovePed(pPed); } } CVehiclePool *VehiclePool = CPools::GetVehiclePool(); for(int32 i = 0; i < VehiclePool->GetSize(); 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()) { if(pVehicle->pDriver) { CPopulation::RemovePed(pVehicle->pDriver); |