mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-23 17:49:16 +01:00
Fix CObject::DeleteAllTempObjectsInArea not considering the given point
This commit is contained in:
parent
8cb3c07151
commit
03ef438a72
@ -515,7 +515,8 @@ CObject::DeleteAllTempObjectsInArea(CVector point, float fRadius)
|
||||
CObjectPool *objectPool = CPools::GetObjectPool();
|
||||
for (int32 i = 0; i < objectPool->GetSize(); i++) {
|
||||
CObject *pObject = objectPool->GetSlot(i);
|
||||
if (pObject && pObject->ObjectCreatedBy == TEMP_OBJECT && fRadius * fRadius > pObject->GetPosition().MagnitudeSqr()) {
|
||||
CVector dist = point - pObject->GetPosition();
|
||||
if (pObject && pObject->ObjectCreatedBy == TEMP_OBJECT && dist.MagnitudeSqr() < fRadius * fRadius) {
|
||||
CWorld::Remove(pObject);
|
||||
delete pObject;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user