fix #2425; Bots should be removed when switching to a map which doesn't allow them

This commit is contained in:
Igor Popov
2012-10-14 14:28:13 +04:00
committed by Chris Forbes
parent 36813ff52f
commit 1d62329969

View File

@@ -278,7 +278,12 @@ namespace OpenRA.Mods.RA.Server
c.State = Session.ClientState.NotReady;
c.Slot = i < slots.Length ? slots[i++] : null;
if (c.Slot != null)
{
// Remove Bot from slot if slot forbids bots
if (c.Bot != null && !server.Map.Players[c.Slot].AllowBots)
server.lobbyInfo.Clients.Remove(c);
S.SyncClientToPlayerReference(c, server.Map.Players[c.Slot]);
}
else if (c.Bot != null)
server.lobbyInfo.Clients.Remove(c);
}