From ac6e915839ba61a130f2cf2fb41339d703053d51 Mon Sep 17 00:00:00 2001 From: deniz1a Date: Fri, 17 Jul 2015 03:03:17 +0300 Subject: [PATCH] Simplifies Start button logic in lobby. --- OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 824f5e23c9..7e612f97eb 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -297,15 +297,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic orderManager.LobbyInfo.Slots.Any(sl => sl.Value.Required && orderManager.LobbyInfo.ClientInSlot(sl.Key) == null); startGameButton.OnClick = () => { - Func, bool> notReady = sl => - { - var cl = orderManager.LobbyInfo.ClientInSlot(sl.Key); - - // Bots and admins don't count - return cl != null && !cl.IsAdmin && cl.Bot == null && !cl.IsReady; - }; - - if (orderManager.LobbyInfo.Slots.Any(notReady)) + // Bots and admins don't count + if (orderManager.LobbyInfo.Clients.Any(c => c.Slot != null && !c.IsAdmin && c.Bot == null && !c.IsReady)) panel = PanelType.ForceStart; else startGame();