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

@@ -1558,6 +1558,7 @@ goto_level(
lua_getglobal(gl.luacore, "nh_callback_run");
lua_pushstring(gl.luacore, nhcb_name[NHCB_LVL_LEAVE]);
nhl_pcall_handle(gl.luacore, 1, 0, "goto_level", NHLpa_panic);
lua_settop(gl.luacore, 0);
}
/* tethered movement makes level change while trapped feasible */