mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
Lua: Call local eventhandlers synchronously when TriggerGlobalEvent is called from inside a handling state
This commit is contained in:
@@ -28,7 +28,7 @@ int main(int argc, char** argv) try {
|
||||
bool Shutdown = false;
|
||||
Application::RegisterShutdownHandler([&Shutdown] { Shutdown = true; });
|
||||
Application::RegisterShutdownHandler([] {
|
||||
auto Futures = LuaAPI::MP::Engine->TriggerEvent("onShutdown");
|
||||
auto Futures = LuaAPI::MP::Engine->TriggerEvent("onShutdown", "");
|
||||
TLuaEngine::WaitForAll(Futures);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user