Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 1385c41

Browse files
committed
Call OnMessage with context, just don't send it
1 parent b88f384 commit 1385c41

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lua/LuaAdapters.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,10 @@ namespace RTE {
410410
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
411411

412412
void LuaAdaptersMovableObject::SendMessage2(MovableObject *luaSelfObject, const std::string &message, luabind::object context) {
413-
// We're not transferring context between lua states, so only run singlethreaded scripts when we have context
413+
// We're not transferring context between lua states, so send context to singlethreaded scripts
414414
LuabindObjectWrapper wrapper(&context, "", false);
415415
luaSelfObject->RunScriptedFunctionInAppropriateScripts("OnMessage", false, false, {}, { message }, { &wrapper }, ThreadScriptsToRun::SingleThreaded);
416+
luaSelfObject->RunScriptedFunctionInAppropriateScripts("OnMessage", false, false, {}, { message }, { }, ThreadScriptsToRun::MultiThreaded);
416417
}
417418

418419
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)