2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:47:42 +00:00

Player reflection and other imps

This commit is contained in:
Jack Andersen
2017-03-25 19:53:04 -10:00
parent db12dd2ea2
commit c069666307
35 changed files with 654 additions and 72 deletions

View File

@@ -83,6 +83,30 @@ CEntity* CObjectList::GetObjectById(TUniqueId uid)
return ent.entity;
}
const CEntity* CObjectList::GetValidObjectById(TUniqueId uid) const
{
if (uid == kInvalidUniqueId)
return nullptr;
const SObjectListEntry& ent = x0_list[uid & 0x3ff];
if (!ent.entity)
return nullptr;
if (ent.entity->GetUniqueId() != uid)
return nullptr;
return ent.entity;
}
CEntity* CObjectList::GetValidObjectById(TUniqueId uid)
{
if (uid == kInvalidUniqueId)
return nullptr;
SObjectListEntry& ent = x0_list[uid & 0x3ff];
if (!ent.entity)
return nullptr;
if (ent.entity->GetUniqueId() != uid)
return nullptr;
return ent.entity;
}
bool CObjectList::IsQualified(const CEntity&) {return true;}
}