mirror of
https://github.com/halpz/re3.git
synced 2025-07-24 14:19:45 +00:00
script revision
This commit is contained in:
@ -396,3 +396,18 @@ CObject::DeleteAllTempObjectsInArea(CVector point, float fRadius)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
IsObjectPointerValid(CObject* pObject)
|
||||
{
|
||||
if (!pObject)
|
||||
return false;
|
||||
int index = CPools::GetObjectPool()->GetJustIndex(pObject);
|
||||
#ifdef FIX_BUGS
|
||||
if (index < 0 || index >= CPools::GetObjectPool()->GetSize())
|
||||
#else
|
||||
if (index < 0 || index > CPools::GetObjectPool()->GetSize())
|
||||
#endif
|
||||
return false;
|
||||
return pObject->bIsBIGBuilding || pObject->m_entryInfoList.first;
|
||||
}
|
||||
|
@ -113,3 +113,5 @@ public:
|
||||
static void DeleteAllTempObjects();
|
||||
static void DeleteAllTempObjectsInArea(CVector point, float fRadius);
|
||||
};
|
||||
|
||||
bool IsObjectPointerValid(CObject* pObject);
|
||||
|
Reference in New Issue
Block a user