fix player arrows with cessation and an error from last commit

This commit is contained in:
bgkillas 2024-11-10 12:36:21 -05:00
parent 9ed82cce73
commit 441ca1df95
2 changed files with 4 additions and 2 deletions

View file

@ -42,7 +42,9 @@ function module.on_world_update()
local gui_id = 2
for peer_id, player_data in pairs(ctx.players) do
if ctx.my_id == peer_id and (ctx.spectating_over_peer_id == nil or ctx.spectating_over_peer_id == peer_id) then
if (ctx.my_id == peer_id
and (ctx.spectating_over_peer_id == nil or ctx.spectating_over_peer_id == peer_id))
or EntityHasTag(player_data.entity, "polymorphed_cessation") then
goto continue
end
local px, py = EntityGetTransform(player_data.entity)

View file

@ -26,7 +26,7 @@ local redo = false
local function cant_spectate(ent)
return ((GameHasFlagRun("ending_game_completed") or ctx.proxy_opt.perma_death)
and EntityHasTag(potential_target.entity, "ew_notplayer"))
and EntityHasTag(ent, "ew_notplayer"))
or (EntityHasTag(ent, "polymorphed_cessation")
and cam_target ~= nil and cam_target.entity ~= ent)
end