Exemple #1
0
 public static void LeaveLobby(RemotePlayer player)
 {
     lock (_enterLock)
     {
         bool removed = false;
         lock (Players)
         {
             removed = Players.Remove(player.ID);
             //if (!removed)
             //    return;
         }
         if (removed)
         {
             player.ClearAllInvites();
         }
         var packet  = new S2C_LobbyPlayerLeft(player.GetDisplay());
         var players = GetPlayerList();
         foreach (var p in players)
         {
             p.Connection.Send(packet);
         }
     }
 }