mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-30 13:04:15 +01:00
fix CObject::DeleteAllTempObjectsInArea
This commit is contained in:
parent
5a7e62e4a9
commit
c8b0f0bdf8
@ -813,8 +813,7 @@ CObject::DeleteAllTempObjectsInArea(CVector point, float fRadius)
|
|||||||
CObjectPool *objectPool = CPools::GetObjectPool();
|
CObjectPool *objectPool = CPools::GetObjectPool();
|
||||||
for (int32 i = 0; i < objectPool->GetSize(); i++) {
|
for (int32 i = 0; i < objectPool->GetSize(); i++) {
|
||||||
CObject *pObject = objectPool->GetSlot(i);
|
CObject *pObject = objectPool->GetSlot(i);
|
||||||
CVector dist = point - pObject->GetPosition();
|
if (pObject && pObject->ObjectCreatedBy == TEMP_OBJECT && (point - pObject->GetPosition()).MagnitudeSqr() < SQR(fRadius)) {
|
||||||
if (pObject && pObject->ObjectCreatedBy == TEMP_OBJECT && dist.MagnitudeSqr() < fRadius * fRadius) {
|
|
||||||
CWorld::Remove(pObject);
|
CWorld::Remove(pObject);
|
||||||
delete pObject;
|
delete pObject;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user