From c73ce50a09f1aac46858f0cb874eec41383e4bce Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 25 Dec 2017 01:52:58 +0000 Subject: [PATCH] Include bots in the player count for consistency with the sidebar. --- OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs index 4894687c28..1f893f733c 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs @@ -563,10 +563,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic var players = item.GetOrNull("PLAYERS"); if (players != null) { - players.GetText = () => "{0} / {1}".F(game.Players, game.MaxPlayers) + var label = "{0} / {1}".F(game.Players + game.Bots, game.MaxPlayers + game.Bots) + (game.Spectators > 0 ? " + {0}".F(game.Spectators) : ""); - players.GetColor = () => canJoin ? players.TextColor : incompatibleGameColor; + var color = canJoin ? players.TextColor : incompatibleGameColor; + players.GetText = () => label; + players.GetColor = () => color; } var state = item.GetOrNull("STATUS");