mirror of
https://github.com/mrxenginner/reVC.git
synced 2026-10-11 09:48:15 +08:00
fix CObject::DeleteAllTempObjectsInArea
This commit is contained in:
1 parent
eaf32190ca
commit
f6cc178a50
1 file changed
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user