Skip sending player entity if player is currently a World State Entity

This commit is contained in:
IQuant 2024-10-21 20:16:01 +03:00
parent 7854557e7e
commit 67659b000c

View file

@ -17,7 +17,11 @@ local function entity_changed()
if damage_model ~= nil then
ComponentSetValue2(damage_model, "wait_for_kill_flag_on_death", true)
end
if ctx.my_player.entity == GameGetWorldStateEntity() then
print("Player entity is equal to WSE, skipping...")
return
end
rpc.change_entity({data = util.serialize_entity(ctx.my_player.entity)})
else
rpc.change_entity(nil)