From 4160c7668c9bbb52e9f94a072ab58f0c8419793a Mon Sep 17 00:00:00 2001 From: ulteq Date: Sat, 13 Jun 2015 00:01:48 +0200 Subject: [PATCH] Workaround to prevent accidentally canceling the ladder deployment --- addons/tacticalladder/XEH_postInit.sqf | 3 ++- addons/tacticalladder/functions/fnc_positionTL.sqf | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/tacticalladder/XEH_postInit.sqf b/addons/tacticalladder/XEH_postInit.sqf index 0dca81fd64..f0091ec7fa 100644 --- a/addons/tacticalladder/XEH_postInit.sqf +++ b/addons/tacticalladder/XEH_postInit.sqf @@ -1,12 +1,13 @@ #include "script_component.hpp" GVAR(ladder) = objNull; +GVAR(cancelTime) = 0; GVAR(currentStep) = 3; GVAR(currentAngle) = 0; // Cancel tactical ladder deployment if the interact menu is opened ["interactMenuOpened", { - if (!isNull GVAR(ladder)) then { + if ((ACE_time > GVAR(cancelTime)) && !isNull GVAR(ladder)) then { GVAR(ladder) call FUNC(cancelTLdeploy); }; }] call EFUNC(common,addEventHandler); diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index 022b02da0f..c41b6c1861 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -33,6 +33,7 @@ _ladder animate ["rotate", 0]; } forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3) GVAR(ladder) = _ladder; +GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling GVAR(currentStep) = 3; GVAR(currentAngle) = 0;