Skip to content

Commit

Permalink
Removed add connected players to allow for spectators
Browse files Browse the repository at this point in the history
  • Loading branch information
B3none committed Jan 2, 2024
1 parent f4b0177 commit c5fd02b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Modules/Managers/Queue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,10 @@ private void RemoveDisconnectedPlayers()
QueuePlayers.RemoveAll(player => disconnectedQueuePlayers.Contains(player));
}
}

private void AddConnectedPlayers()
{
var connectedPlayers = Utilities.GetPlayers().Where(player => Helpers.IsValidPlayer(player) && Helpers.IsPlayerConnected(player)).ToList();

foreach (var connectedPlayer in connectedPlayers)
{
if (!ActivePlayers.Contains(connectedPlayer) && !QueuePlayers.Contains(connectedPlayer))
{
Console.WriteLine($"{RetakesPlugin.LogPrefix}Adding {connectedPlayer.PlayerName} to QueuePlayers.");
QueuePlayers.Add(connectedPlayer);
}
}
}

public void Update()
{
RemoveDisconnectedPlayers();
// AddConnectedPlayers();

var playersToAdd = _maxRetakesPlayers - ActivePlayers.Count;

Expand Down

0 comments on commit c5fd02b

Please sign in to comment.