mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix most of item sync, fix some theoretical minor bugs in inventory sync/enemy sync
This commit is contained in:
parent
b8e16e1f1f
commit
a60a1f7aff
3 changed files with 93 additions and 71 deletions
|
@ -310,7 +310,8 @@ local function on_world_pre_update_inner()
|
|||
player_fns.respawn_if_necessary()
|
||||
end
|
||||
|
||||
if ctx.events.new_player_just_connected or ctx.events.inventory_maybe_just_changed or (GameGetFrameNum() % 5 == 0 and inventory_helper.has_inventory_changed(ctx.my_player)) then
|
||||
local sha_check = GameGetFrameNum() % 5 == 0 and inventory_helper.has_inventory_changed(ctx.my_player)
|
||||
if ctx.events.new_player_just_connected or ctx.events.inventory_maybe_just_changed or sha_check then
|
||||
local inventory_state = player_fns.serialize_items(ctx.my_player)
|
||||
if inventory_state ~= nil then
|
||||
net.send_player_inventory(inventory_state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue