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

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