Merge pull request #5405 from RoosterDragon/min-max

Added MinBy, MaxBy, etc.
This commit is contained in:
Paul Chote
2014-06-09 17:42:01 +12:00
16 changed files with 90 additions and 47 deletions

View File

@@ -535,7 +535,7 @@ namespace OpenRA.Server
LobbyInfo.Clients.RemoveAll(c => c.Bot != null && c.BotControllerClientIndex == toDrop.PlayerIndex);
var nextAdmin = LobbyInfo.Clients.Where(c1 => c1.Bot == null)
.OrderBy(c => c.Index).FirstOrDefault();
.MinByOrDefault(c => c.Index);
if (nextAdmin != null)
{