diff options
author | aap <aap@papnet.eu> | 2020-12-08 23:15:59 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-08 23:15:59 +0100 |
commit | f6cc178a502b276128d52ed976e8dbe53875da8a (patch) | |
tree | 6930d35cb036c55b474cc2cc0a13d597df4e9322 /src/objects/Object.cpp | |
parent | Merge branch 'master' of https://github.com/GTAmodding/re3 (diff) | |
download | re3-f6cc178a502b276128d52ed976e8dbe53875da8a.tar re3-f6cc178a502b276128d52ed976e8dbe53875da8a.tar.gz re3-f6cc178a502b276128d52ed976e8dbe53875da8a.tar.bz2 re3-f6cc178a502b276128d52ed976e8dbe53875da8a.tar.lz re3-f6cc178a502b276128d52ed976e8dbe53875da8a.tar.xz re3-f6cc178a502b276128d52ed976e8dbe53875da8a.tar.zst re3-f6cc178a502b276128d52ed976e8dbe53875da8a.zip |
Diffstat (limited to 'src/objects/Object.cpp')
-rw-r--r-- | src/objects/Object.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index 466cecac..411e245a 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -389,8 +389,7 @@ CObject::DeleteAllTempObjectsInArea(CVector point, float fRadius) CObjectPool *objectPool = CPools::GetObjectPool(); for (int32 i = 0; i < objectPool->GetSize(); i++) { CObject *pObject = objectPool->GetSlot(i); - CVector dist = point - pObject->GetPosition(); - if (pObject && pObject->ObjectCreatedBy == TEMP_OBJECT && dist.MagnitudeSqr() < fRadius * fRadius) { + if (pObject && pObject->ObjectCreatedBy == TEMP_OBJECT && (point - pObject->GetPosition()).MagnitudeSqr() < SQR(fRadius)) { CWorld::Remove(pObject); delete pObject; } |