From 14bc7885b38ce8f94ccdacb7bf0deb4d88294908 Mon Sep 17 00:00:00 2001 From: Ivaylo Draganov Date: Mon, 10 Jun 2019 00:41:13 +0300 Subject: [PATCH] Always prompt the user to confirm when leaving a game --- .../Widgets/Logic/Ingame/IngameMenuLogic.cs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameMenuLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameMenuLogic.cs index e42cac1e1a..f0ba4e9882 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameMenuLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameMenuLogic.cs @@ -194,18 +194,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic { hideMenu = true; - if (world.LocalPlayer == null || world.LocalPlayer.WinState != WinState.Won) - { - ConfirmationDialogs.ButtonPrompt( - title: "Leave Mission", - text: "Leave this game and return to the menu?", - onConfirm: OnQuit, - onCancel: ShowMenu, - confirmText: "Leave", - cancelText: "Stay"); - } - else - OnQuit(); + ConfirmationDialogs.ButtonPrompt( + title: "Leave Mission", + text: "Leave this game and return to the menu?", + onConfirm: OnQuit, + onCancel: ShowMenu, + confirmText: "Leave", + cancelText: "Stay"); }; }