Hopefully fixed desync

This commit is contained in:
Cooldude2606
2018-09-11 17:31:34 +01:00
parent a338fc0b57
commit c37e66be27

View File

@@ -172,8 +172,8 @@ Event.register(defines.events.on_player_respawned,function(event)
if Gui._global().players and is_type(Gui._global().players,'table') and #Gui._global().players > 0 and Gui._global().players[event.player_index] then
local remove = {}
for index,cam in pairs(Gui._global().players[event.player_index]) do
Gui.cam_link{cam=cam,entity=Game.get_player(event).character}
if not cam.valid then table.insert(remove,index) end
if not cam.valid then table.insert(remove,index)
else cam.entity=Game.get_player(event).character end
end
for _,index in pairs(remove) do
table.remove(Gui._global().players[event.player_index],index)