summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-28 17:21:00 +0300
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-28 17:21:00 +0300
commit111d23beabbc580d2f1befec11b2fd114f297d5f (patch)
tree120028473f2accc1f07331aa417da5c9d8fa7848
parent9bcec542911c461d60dd80772b97f30399f3c818 (diff)
fix
-rw-r--r--src/core/World.cpp4
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);