Merge pull request #12710 from pchote/spectator-sort

Sort servers with spectators above empty servers.
This commit is contained in:
reaperrr
2017-02-08 23:16:39 +01:00
committed by GitHub

View File

@@ -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))