From d18f470394d9ddfce5a15b861d83cda42a578d6f Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 11 Feb 2015 22:39:31 +0100 Subject: [PATCH] allow rangefinder while the fcs is active --- addons/fcs/XEH_clientInit.sqf | 2 +- addons/fcs/functions/fnc_keyDown.sqf | 2 +- addons/fcs/initKeybinds.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/fcs/XEH_clientInit.sqf b/addons/fcs/XEH_clientInit.sqf index 918548e71e..17faa70f17 100644 --- a/addons/fcs/XEH_clientInit.sqf +++ b/addons/fcs/XEH_clientInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -GVAR(enabled) = True; +GVAR(enabled) = false; GVAR(time) = 0; GVAR(position) = [0,0,0]; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index 5a3febf6ea..7699b82a20 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -19,7 +19,7 @@ _turret = _this select 1; _distance = call FUNC(getRange); -if !(call FUNC(canUseFCS)) exitWith {}; +if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {}; GVAR(Enabled) = true; GVAR(Time) = time; diff --git a/addons/fcs/initKeybinds.sqf b/addons/fcs/initKeybinds.sqf index bc3cf33bf5..dd1a94b78e 100644 --- a/addons/fcs/initKeybinds.sqf +++ b/addons/fcs/initKeybinds.sqf @@ -7,7 +7,7 @@ _exceptions = []; if !(_exceptions call EGVAR(common,canInteract)) exitWith {false}; // Conditions: specific - if !(!GVAR(enabled) && {call FUNC(canUseRangefinder) || FUNC(canUseFCS)}) exitWith {false}; + if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false}; // prevent holding down if (GETGVAR(isDownStateKey1,false)) exitWith {false};