private static void HandlePlayerSync(PlayerSync sync) { if (sync == null) { throw new WrongPacketTypeException(); } // Remove inactive players Fortress fortress = World.Instance.GetFortress(sync.FortressID); fortress.SetVisible(true); fortress.Initialize(sync.UserID, sync.Team); fortress.SetToScore(sync.Score); if (!sync.Active) { World.Instance.RemovePlayer(sync.UserID); return; } Player player = World.Instance.GetOrAddPlayer(sync.UserID, sync.FortressID); player.UpdateFromServer(sync); }