Fix sampo staying

This commit is contained in:
IQuant 2024-08-21 22:15:51 +03:00
parent 334556f80d
commit 61c9b32854

View file

@ -12,6 +12,8 @@ util.replace_text_in("data/entities/animals/boss_centipede/sampo.xml", "data/ent
rpc.opts_reliable()
rpc.opts_everywhere()
function rpc.gather_and_do_ending(x, y, sx, sy)
net.proxy_send("reset_world", "")
EntitySetTransform(ctx.my_player.entity, x, y)
local entity = EntityCreateNew("totally_sampo")
@ -26,13 +28,12 @@ function rpc.gather_and_do_ending(x, y, sx, sy)
dofile("data/entities/animals/boss_centipede/ending/sampo_start_ending_sequence.lua")
GetUpdatedEntityID = old_updated
net.proxy_send("reset_world", "")
end
np.CrossCallAdd("ew_ending_sequence", function(sx, sy, sampo_ent)
EntityKill(sampo_ent)
local x, y = EntityGetTransform(ctx.my_player.entity)
rpc.gather_and_do_ending(x, y, sx, sy)
EntityKill(sampo_ent)
end)
return module