Fix intermittent failure to call event handlers

The wrong value got duplicated in 87b81ceb45, oops. Makes you wonder how the script in the commit message worked at all.
This commit is contained in:
Tamás Bálint Misius
2025-05-05 10:29:33 +02:00
parent 87b81ceb45
commit 96cd4b6996

View File

@@ -416,7 +416,7 @@ bool CommandInterface::HandleEvent(const GameControllerEvent &event)
{
it->Push(L);
++it;
lua_pushvalue(L, 1);
lua_pushvalue(L, -1);
int numArgs = pushGameControllerEvent(L, event);
int callret = tpt_lua_pcall(L, numArgs, 1, 0, std::visit([](auto &event) {
return event.traits;