lazily fix new game crash

This commit is contained in:
bgkillas 2024-10-20 13:50:32 -04:00
parent f9c041bbcf
commit 4f2521cf2c
2 changed files with 4 additions and 1 deletions

View file

@ -55,6 +55,7 @@ function rpc.try_kill(x, y)
async(function()
wait(180)
if not ctx.run_ended then
ctx.run_ended = true
GameTriggerGameOver()
end
end)

View file

@ -280,7 +280,9 @@ local function on_world_pre_update_inner()
GlobalsSetValue("ew_player_rng", tostring(GameGetFrameNum()))
net.update()
if not ctx.run_ended then
net.update()
end
local inventory_gui_comp = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "InventoryGuiComponent")
if inventory_gui_comp and inventory_gui_comp ~= 0 then