Merge pull request #5143 from Mailaender/skirmish-bots-forbidden-slots

Fixed bots being added when the map disallows it
This commit is contained in:
Paul Chote
2014-04-21 01:13:03 +12:00
2 changed files with 13 additions and 5 deletions

View File

@@ -76,6 +76,11 @@ namespace OpenRA.Network
return Slots.FirstOrDefault(s => !s.Value.Closed && ClientInSlot(s.Key) == null).Key;
}
public string FirstEmptyBotSlot()
{
return Slots.FirstOrDefault(s => !s.Value.Closed && ClientInSlot(s.Key) == null && s.Value.AllowBots).Key;
}
public bool IsSinglePlayer
{
get { return Clients.Count(c => c.Bot == null) == 1; }