private void Player_Exited(object sender, Networking.Common.Peer e) { ServerPlayer sp = e as ServerPlayer; if (sp == null || !PlayerList.Contains(sp)) { return; } lock (PlayerList) PlayerList.Remove(sp); MsgRemovePlayer exit = new MsgRemovePlayer(); exit.PlayerID = sp.PlayerID; SendToAll(exit, false); if (Teams.ContainsKey(sp.ActualTeam)) { Teams[sp.ActualTeam].Remove(sp); } }
private void P_Disconnected(object sender, Networking.Common.Peer e) { Logger.Log3("Socket " + e.GetTCPRemoteAddresString() + " disconnected "); }
private void Player_Disconnected(object sender, Networking.Common.Peer e) { lock (PlayerList) PlayerList.Remove(e as ServerPlayer); }
private void Player_Exited(object sender, Networking.Common.Peer e) { RemovePlayer(e as ServerPlayer); }