aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-29 20:29:52 +0300
committereray orçunus <erayorcunus@gmail.com>2020-05-29 20:29:52 +0300
commit64382445406ec2ea7975f6729d4068d954e0735d (patch)
treefac5236294451b5052f337c21113e32f17338218 /src
parent9adde91b3a22d15d5e83f94cc9f0b5a9aa4b6b2c (diff)
parente65a09ea09ccc60c10e4969f8b98c3dfb7566f0f (diff)
Merge branch 'master' of https://github.com/GTAmodding/re3 into erorcun
Diffstat (limited to 'src')
-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);