2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

Various imps, completed CCollisionResponse RE

This commit is contained in:
2016-07-24 23:24:57 -07:00
parent 7d33e6ede3
commit 9b62191975
16 changed files with 335 additions and 153 deletions

View File

@@ -1,4 +1,6 @@
#include "CScriptMemoryRelay.hpp"
#include "CStateManager.hpp"
#include "CRelayTracker.hpp"
namespace urde
{
@@ -7,8 +9,30 @@ CScriptMemoryRelay::CScriptMemoryRelay(TUniqueId uid, const std::string& name, c
: CEntity(uid, info, true, name),
x34_24_(b1),
x34_25_(b2),
x34_26_(b3)
x34_26_ignoreMessages(b3)
{
}
void CScriptMemoryRelay::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager &stateMgr)
{
if (x34_26_ignoreMessages)
return;
if (msg == EScriptObjectMessage::Deactivate)
{
stateMgr.GetRelayTracker()->RemoveRelay(xc_editorId);
return;
}
else if (msg == EScriptObjectMessage::Activate)
{
stateMgr.GetRelayTracker()->AddRelay(xc_editorId);
if (x34_25_)
return;
SendScriptMsgs(EScriptObjectState::Active, stateMgr, EScriptObjectMessage::None);
return;
}
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
}
}