/// <summary> /// Disconnects a client from this listener /// </summary> /// <param name="client">The target client to be disconnected</param> public void Disconnect(NetworkingPlayer player, bool forced) { if (forced) { DisconnectingPlayers.Add(player); } else { ForcedDisconnectingPlayers.Add(player); } }
/// <summary> /// Disconnects a client /// </summary> /// <param name="client">The target client to be disconnected</param> public void Disconnect(NetworkingPlayer player, bool forced) { if (player.IsDisconnecting || DisconnectingPlayers.Contains(player) || ForcedDisconnectingPlayers.Contains(player)) { return; } if (!forced) { DisconnectingPlayers.Add(player); } else { ForcedDisconnectingPlayers.Add(player); } }
/// <summary> /// Disconnects a client from this listener /// </summary> /// <param name="client">The target client to be disconnected</param> public void Disconnect(NetworkingPlayer player, bool forced) { if (!forced) { if (!DisconnectingPlayers.Contains(player)) { DisconnectingPlayers.Add(player); } } else { if (!ForcedDisconnectingPlayers.Contains(player)) { ForcedDisconnectingPlayers.Add(player); } } }