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

Remove rstl::optional_object, various cleanups, implement CExplosion and CScriptDoor

This commit is contained in:
2018-04-29 20:12:41 -07:00
parent 6d60ccfd04
commit 711c3e0d2c
79 changed files with 486 additions and 189 deletions

View File

@@ -218,7 +218,7 @@ void CScriptTrigger::UpdateInhabitants(float dt, CStateManager& mgr)
if ((x12c_flags & ETriggerFlags::DetectCamera) != ETriggerFlags::None)
{
InhabitantAdded(*cam, mgr);
//SendScriptMsgs(EScriptObjectState::Entered, mgr, EScriptObjectMessage::Activate);
SendScriptMsgs(EScriptObjectState::Entered, mgr, EScriptObjectMessage::Activate);
}
}
}
@@ -226,12 +226,12 @@ void CScriptTrigger::UpdateInhabitants(float dt, CStateManager& mgr)
if (sendInside)
{
//SendScriptMsgs(EScriptObjectState::Inside, mgr, EScriptObjectMessage::Activate);
SendScriptMsgs(EScriptObjectState::Inside, mgr, EScriptObjectMessage::Activate);
}
if (sendExited)
{
//SendScriptMsgs(EScriptObjectState::Exited, mgr, EScriptObjectMessage::Activate);
SendScriptMsgs(EScriptObjectState::Exited, mgr, EScriptObjectMessage::Activate);
if (x148_27_deactivateOnExited)
{
mgr.SendScriptMsg(GetUniqueId(), mgr.GetEditorIdForUniqueId(GetUniqueId()),
@@ -242,7 +242,7 @@ void CScriptTrigger::UpdateInhabitants(float dt, CStateManager& mgr)
std::list<CScriptTrigger::CObjectTracker>& CScriptTrigger::GetInhabitants() { return xe8_inhabitants; }
rstl::optional_object<zeus::CAABox> CScriptTrigger::GetTouchBounds() const
std::experimental::optional<zeus::CAABox> CScriptTrigger::GetTouchBounds() const
{
if (x30_24_active)
return {GetTriggerBoundsWR()};
@@ -319,7 +319,7 @@ void CScriptTrigger::Touch(CActor& act, CStateManager& mgr)
}
}
//SendScriptMsgs(EScriptObjectState::Entered, mgr, EScriptObjectMessage::None);
SendScriptMsgs(EScriptObjectState::Entered, mgr, EScriptObjectMessage::None);
if (x148_26_deactivateOnEntered)
{