summaryrefslogtreecommitdiffstats
path: root/src/core/World.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-06-03 00:24:08 +0200
committerSergeanur <s.anureev@yandex.ua>2020-06-03 00:24:08 +0200
commit509ca11d76373671281f17c7f828a0187ed7b9e4 (patch)
treec3d072fd7933274fbfc9f85f6be4a09613b2e7be /src/core/World.cpp
parentsome CBike code; vehicle cleanup (diff)
parentsome vehicle cleanup (diff)
downloadre3-509ca11d76373671281f17c7f828a0187ed7b9e4.tar
re3-509ca11d76373671281f17c7f828a0187ed7b9e4.tar.gz
re3-509ca11d76373671281f17c7f828a0187ed7b9e4.tar.bz2
re3-509ca11d76373671281f17c7f828a0187ed7b9e4.tar.lz
re3-509ca11d76373671281f17c7f828a0187ed7b9e4.tar.xz
re3-509ca11d76373671281f17c7f828a0187ed7b9e4.tar.zst
re3-509ca11d76373671281f17c7f828a0187ed7b9e4.zip
Diffstat (limited to 'src/core/World.cpp')
-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 06108c5c..53d36854 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -122,14 +122,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);