#10416 Added ready checkbox for spectating admins

This commit is contained in:
Matthew Uzzell
2016-07-01 23:40:17 +01:00
parent fc50127390
commit 6110357460
6 changed files with 80 additions and 5 deletions

View File

@@ -60,7 +60,8 @@ namespace OpenRA.Mods.Common.Server
static void CheckAutoStart(S server)
{
var playerClients = server.LobbyInfo.Clients.Where(c => c.Bot == null && c.Slot != null);
// A spectating admin is included for checking these rules
var playerClients = server.LobbyInfo.Clients.Where(c => (c.Bot == null && c.Slot != null) || c.IsAdmin);
// Are all players ready?
if (!playerClients.Any() || playerClients.Any(c => c.State != Session.ClientState.Ready))
@@ -188,6 +189,7 @@ namespace OpenRA.Mods.Common.Server
client.SpawnPoint = 0;
client.Color = HSLColor.FromRGB(255, 255, 255);
server.SyncLobbyClients();
CheckAutoStart(server);
return true;
}
else