Do garbage collection on luacore

Another lua state that is not freed until end of game,
so clean up the stack and do GC regularly.
This commit is contained in:
Pasi Kallinen
2024-02-03 12:55:07 +02:00
parent e7a7526ea9
commit 0d7fc06eb9
5 changed files with 18 additions and 1 deletions

View File

@@ -512,6 +512,7 @@ moveloop_core(void)
lua_getglobal(gl.luacore, "nh_callback_run");
lua_pushstring(gl.luacore, nhcb_name[NHCB_END_TURN]);
nhl_pcall_handle(gl.luacore, 1, 0, "moveloop_core", NHLpa_panic);
lua_settop(gl.luacore, 0);
}
}