Fix a weird LUI/UI scripting related crash

This commit is contained in:
Federico Cecchetto 2022-02-02 21:31:22 +01:00
parent ccf79ddd66
commit 2470553e1e

View File

@ -200,7 +200,12 @@ namespace ui_scripting
{
scheduler::loop([]()
{
ui_scripting::lua::engine::run_frame();
const auto self_id = GetCurrentThreadId();
if (self_id == game::threadIds[game::THREAD_CONTEXT_MAIN])
{
ui_scripting::lua::engine::run_frame();
}
fps::draw();
branding::draw();
game_console::draw_console();