Fixed Exception when ReadyPlayers < MinTraitors
This commit is contained in:
@@ -91,6 +91,11 @@ namespace Content.Server.GameTicking.GamePresets
|
||||
IPlayerSession traitor;
|
||||
if(prefList.Count == 0)
|
||||
{
|
||||
if (list.Count == 0)
|
||||
{
|
||||
Logger.InfoS("preset", "Insufficient ready players to fill up with traitors, stopping the selection.");
|
||||
break;
|
||||
}
|
||||
traitor = _random.PickAndTake(list);
|
||||
Logger.InfoS("preset", "Insufficient preferred traitors, picking at random.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user