fix spectate shield

This commit is contained in:
bgkillas 2024-10-05 14:41:01 -04:00
parent 753632e1d1
commit a12f1d4e32

View file

@ -95,6 +95,9 @@ function module.on_world_update()
end
for peer_id, _ in pairs(ctx.players) do
for shield_id, shield in pairs(shield_entities) do
if ctx.players[shield_id] == nil then
shield_entities[shield_id] = nil
end
if peer_id == shield[1] then
local shield_ent = shield[2]
local my_x, my_y = EntityGetTransform(ctx.players[peer_id].entity)