fix stack overflow error

This commit is contained in:
MihailRis 2026-09-02 00:11:45 +03:00
parent 372214ab73
commit 507ff7ac93
2 changed files with 2 additions and 0 deletions

View file

@ -334,6 +334,7 @@ void scripting::on_world_tick(int tps) {
if (lua::get_from_registry(L, lua::INTERNALS_TABLE, "on_world_tick", true)) {
lua::pushinteger(L, tps);
lua::call_nothrow(L, 1, 0);
lua::pop(L);
}
for (auto& pack : content_control->getAllContentPacks()) {
lua::emit_event(L, pack.id + ":.worldtick");