less errors from player tether

This commit is contained in:
bgkillas 2024-10-28 21:55:04 -04:00
parent dfe424a28d
commit 8b2bbdfa75

View file

@ -205,6 +205,9 @@ function module.on_world_update_client()
return return
end end
local host_playerdata = player_fns.peer_get_player_data(ctx.host_id, true) local host_playerdata = player_fns.peer_get_player_data(ctx.host_id, true)
if host_playerdata == nil or host_playerdata.entity == nil or not EntityGetIsAlive(host_playerdata.entity) then
return
end
local x1, y1 = EntityGetTransform(host_playerdata.entity) local x1, y1 = EntityGetTransform(host_playerdata.entity)
if x1 == nil or x2 == nil then if x1 == nil or x2 == nil then
return return