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

Proper TUniqueId implementation, minor bug fixes in CSortedListManager

This commit is contained in:
2017-08-10 06:40:07 -07:00
parent 9d85e7dbfe
commit 8409cf7868
12 changed files with 123 additions and 101 deletions

View File

@@ -779,7 +779,7 @@ void CGameArea::Validate(CStateManager& mgr)
TUniqueId id = mgr.GetIdForScript(entId);
if (id != kInvalidUniqueId)
{
CPostConstructed::MapEntry& ent = x12c_postConstructed->xa8_pvsEntityMap[id & 0x3ff];
CPostConstructed::MapEntry& ent = x12c_postConstructed->xa8_pvsEntityMap[id.Value()];
ent.x0_id = i + (pvs->GetNumFeatures() - pvs->GetNumActors());
ent.x4_uid = id;
}
@@ -1097,12 +1097,12 @@ CGameArea::MREAHeader CGameArea::VerifyHeader() const
TUniqueId CGameArea::LookupPVSUniqueID(TUniqueId id) const
{
return x12c_postConstructed->xa8_pvsEntityMap[id & 0x3ff].x4_uid;
return x12c_postConstructed->xa8_pvsEntityMap[id.Value()].x4_uid;
}
s16 CGameArea::LookupPVSID(TUniqueId id) const
{
return x12c_postConstructed->xa8_pvsEntityMap[id & 0x3ff].x0_id;
return x12c_postConstructed->xa8_pvsEntityMap[id.Value()].x0_id;
}
void CGameArea::SetAreaAttributes(const CScriptAreaAttributes* areaAttributes)