From 0c334c8ba023fe6b154e6459707a702ad2a3440d Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 5 Feb 2017 14:55:22 +0000 Subject: [PATCH] Sort servers with spectators above empty servers. --- OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs index a9e69d52d7..ddd2a07b28 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MultiplayerLogic.cs @@ -371,13 +371,17 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (g.State == (int)ServerState.WaitingPlayers && g.Players > 0) return 0; + // Then servers with spectators + if (g.State == (int)ServerState.WaitingPlayers && g.Spectators > 0) + return 1; + // Then active games if (g.State >= (int)ServerState.GameStarted) - return 1; + return 2; // Empty servers are shown at the end because a flood of empty servers // at the top of the game list make the community look dead - return 2; + return 3; }; foreach (var loop in modGames.OrderBy(listOrder).ThenByDescending(g => g.Players))