2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 15:07:41 +00:00

Lots of ScriptObject and Collision work

This commit is contained in:
2017-01-03 20:08:30 -08:00
parent daa7d510f8
commit b765ce3eb7
49 changed files with 899 additions and 182 deletions

View File

@@ -725,8 +725,27 @@ void CStateManager::ClearGraveyard()
{
}
void CStateManager::DeleteObjectRequest(TUniqueId)
void CStateManager::DeleteObjectRequest(TUniqueId id)
{
CEntity* entity = ObjectById(id);
if (!entity)
return;
if (entity->IsInGraveyard())
return;
entity->SetIsInGraveyard(true);
x858_objectGraveyard.push_back(entity->GetUniqueId());
entity->AcceptScriptMsg(EScriptObjectMessage::InternalMessage12, kInvalidUniqueId, *this);
entity->SetIsScriptingBlocked(true);
CActor* actor = static_cast<CActor*>(entity);
if (actor)
{
x874_sortedListManager->Remove(actor);
actor->SetUseInSortedList(false);
}
}
CEntity* CStateManager::ObjectById(TUniqueId uid)