Update ScriptComponent.h

This commit is contained in:
David Markowitz
2026-06-22 02:33:59 -07:00
parent 361db1853c
commit 2456bd3e42

View File

@@ -55,7 +55,7 @@ public:
const auto boundMsg = std::bind(scriptHandler, scriptThis, std::placeholders::_1, std::placeholders::_2);
auto* const parent = m_Parent;
const auto castWrapper = [parent, boundMsg](GameMessages::GameMsg& msg) {
return boundMsg(*m_Parent, static_cast<DerivedMsgType&>(msg));
return boundMsg(*parent, static_cast<DerivedMsgType&>(msg));
};
DerivedMsgType msg;
m_Parent->RegisterMsg(msg.msgId, castWrapper);