mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 09:47:43 +00:00
Major scoped-enum refactor
This commit is contained in:
@@ -11,30 +11,30 @@ void CEntity::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateM
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
case MsgActivate:
|
||||
case EScriptObjectMessage::Activate:
|
||||
if (!GetActive())
|
||||
{
|
||||
SetActive(true);
|
||||
SendScriptMsgs(StActive, stateMgr, MsgNone);
|
||||
SendScriptMsgs(EScriptObjectState::Active, stateMgr, EScriptObjectMessage::None);
|
||||
}
|
||||
break;
|
||||
case MsgDeactivate:
|
||||
case EScriptObjectMessage::Deactivate:
|
||||
if (GetActive())
|
||||
{
|
||||
SetActive(false);
|
||||
SendScriptMsgs(StInactive, stateMgr, MsgNone);
|
||||
SendScriptMsgs(EScriptObjectState::Inactive, stateMgr, EScriptObjectMessage::None);
|
||||
}
|
||||
break;
|
||||
case MsgToggleActive:
|
||||
case EScriptObjectMessage::ToggleActive:
|
||||
if (GetActive())
|
||||
{
|
||||
SetActive(false);
|
||||
SendScriptMsgs(StInactive, stateMgr, MsgNone);
|
||||
SendScriptMsgs(EScriptObjectState::Inactive, stateMgr, EScriptObjectMessage::None);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetActive(true);
|
||||
SendScriptMsgs(StActive, stateMgr, MsgNone);
|
||||
SendScriptMsgs(EScriptObjectState::Active, stateMgr, EScriptObjectMessage::None);
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
|
||||
Reference in New Issue
Block a user