Exemple #1
0
        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);
            }
        }
Exemple #2
0
 private void P_Disconnected(object sender, Networking.Common.Peer e)
 {
     Logger.Log3("Socket " + e.GetTCPRemoteAddresString() + " disconnected ");
 }
Exemple #3
0
 private void Player_Disconnected(object sender, Networking.Common.Peer e)
 {
     lock (PlayerList)
         PlayerList.Remove(e as ServerPlayer);
 }
Exemple #4
0
 private void Player_Exited(object sender, Networking.Common.Peer e)
 {
     RemovePlayer(e as ServerPlayer);
 }