Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
fix CObject::DeleteAllTempObjectsInArea
  • Loading branch information
aap committed Dec 8, 2020
1 parent eaf3219 commit f6cc178a502b276128d52ed976e8dbe53875da8a
Showing with 1 addition and 2 deletions.
  1. +1 −2 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;
}

0 comments on commit f6cc178

Please sign in to comment.