Skip to content

Commit

Permalink
Workaround to prevent accidentally canceling the ladder deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ulteq committed Jun 12, 2015
1 parent 8336f1d commit 4160c76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/tacticalladder/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
1 change: 1 addition & 0 deletions addons/tacticalladder/functions/fnc_positionTL.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4160c76

Please sign in to comment.