diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-28 16:21:00 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-28 16:21:00 +0200 |
commit | 111d23beabbc580d2f1befec11b2fd114f297d5f (patch) | |
tree | 120028473f2accc1f07331aa417da5c9d8fa7848 /src/core | |
parent | Merge pull request #599 from Nick007J/master (diff) | |
download | re3-111d23beabbc580d2f1befec11b2fd114f297d5f.tar re3-111d23beabbc580d2f1befec11b2fd114f297d5f.tar.gz re3-111d23beabbc580d2f1befec11b2fd114f297d5f.tar.bz2 re3-111d23beabbc580d2f1befec11b2fd114f297d5f.tar.lz re3-111d23beabbc580d2f1befec11b2fd114f297d5f.tar.xz re3-111d23beabbc580d2f1befec11b2fd114f297d5f.tar.zst re3-111d23beabbc580d2f1befec11b2fd114f297d5f.zip |
Diffstat (limited to '')
-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); |