diff --git a/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp b/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp index 2e70597c..32bfaea9 100644 --- a/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp +++ b/include/MetroidPrime/ScriptObjects/CScriptMazeNode.hpp @@ -81,8 +81,8 @@ public: static void LoadMazeSeeds(); - inline void SendScriptMsg(CStateManager& mgr, CEntity* to, EScriptObjectMessage msg) { - mgr.SendScriptMsg(to, GetUniqueId(), msg); + static inline void SendScriptMsg(CStateManager& mgr, CEntity* to, TUniqueId sender, EScriptObjectMessage msg) { + mgr.SendScriptMsg(to, sender, msg); } private: @@ -117,4 +117,4 @@ private: static uint sMazeSeeds[300]; }; -#endif \ No newline at end of file +#endif diff --git a/src/MetroidPrime/ScriptObjects/CScriptMazeNode.cpp b/src/MetroidPrime/ScriptObjects/CScriptMazeNode.cpp index f39cc6f9..430b252f 100644 --- a/src/MetroidPrime/ScriptObjects/CScriptMazeNode.cpp +++ b/src/MetroidPrime/ScriptObjects/CScriptMazeNode.cpp @@ -300,13 +300,11 @@ void CScriptMazeNode::Reset(CStateManager& mgr) { x11c_effectId = xfc_actorId = x10c_triggerId = xf4_gateEffectId = kInvalidUniqueId; } -// TODO non-matching -// https://decomp.me/scratch/3F51I void CScriptMazeNode::SendScriptMsgs(CStateManager& mgr, EScriptObjectMessage msg) { - mgr.SendScriptMsg(mgr.ObjectById(x11c_effectId), GetUniqueId(), msg); - mgr.SendScriptMsg(mgr.ObjectById(xfc_actorId), GetUniqueId(), msg); - mgr.SendScriptMsg(mgr.ObjectById(x10c_triggerId), GetUniqueId(), msg); - mgr.SendScriptMsg(mgr.ObjectById(xf4_gateEffectId), GetUniqueId(), msg); + SendScriptMsg(mgr, mgr.ObjectById(x11c_effectId), GetUniqueId(), msg); + SendScriptMsg(mgr, mgr.ObjectById(xfc_actorId), GetUniqueId(), msg); + SendScriptMsg(mgr, mgr.ObjectById(x10c_triggerId), GetUniqueId(), msg); + SendScriptMsg(mgr, mgr.ObjectById(xf4_gateEffectId), GetUniqueId(), msg); } void CScriptMazeNode::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {