From 70ffefde10b779baa0b980a93815c6d1676f4ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Badano?= Date: Mon, 23 Mar 2015 21:26:40 -0300 Subject: [PATCH] Possibly close multiple dialogs when interact_menu is opened --- addons/interact_menu/functions/fnc_keyDown.sqf | 4 +++- addons/interact_menu/functions/fnc_keyDownSelfAction.sqf | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 1f4bd55247..e7c6815d50 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -13,7 +13,9 @@ #include "script_component.hpp" if(!GVAR(keyDown)) then { - closeDialog 0; + while {dialog} do { + closeDialog 0; + }; // Only interact with others if on foot if (vehicle ACE_player != ACE_player) exitWith {}; diff --git a/addons/interact_menu/functions/fnc_keyDownSelfAction.sqf b/addons/interact_menu/functions/fnc_keyDownSelfAction.sqf index f378964d01..ae51d36109 100644 --- a/addons/interact_menu/functions/fnc_keyDownSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_keyDownSelfAction.sqf @@ -13,7 +13,9 @@ #include "script_component.hpp" if(!GVAR(keyDownSelfAction)) then { - closeDialog 0; + while {dialog} do { + closeDialog 0; + }; GVAR(keyDownSelfAction) = true; GVAR(keyDown) = false;