Fixes for the FCS; it was missing a lot of calls before FUNCs.

That made the rangefinder only work once. The flag for preventing holding is not needed becase GVAR(enabled) serving the same purpose.
This commit is contained in:
Nicolás Badano 2015-02-15 17:43:57 -03:00
parent 08af51c4a7
commit 2105bc18db
2 changed files with 5 additions and 12 deletions

View File

@ -19,7 +19,7 @@ _turret = _this select 1;
_distance = call FUNC(getRange);
if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {};
if !(!GVAR(enabled) && [] call FUNC(canUseFCS)) exitWith {};
GVAR(Enabled) = true;
GVAR(Time) = time;

View File

@ -7,11 +7,7 @@
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
// prevent holding down
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
GVAR(isDownStateKey1) = true;
if !((!GVAR(enabled) && [] call FUNC(canUseFCS)) || [] call FUNC(canUseRangefinder)) exitWith {false};
// Statement
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyDown);
@ -26,14 +22,11 @@
["ACE3",
localize "STR_ACE_FCS_LaseTarget",
{
// prevent holding down
GVAR(isDownStateKey1) = false;
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(GVAR(enabled) && FUNC(canUseFCS)) exitWith {false};
if !(GVAR(enabled) && [] call FUNC(canUseFCS)) exitWith {false};
// Statement
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp);
@ -51,7 +44,7 @@
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(FUNC(canUseFCS)) exitWith {false};
if !([] call FUNC(canUseFCS)) exitWith {false};
// Statement
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), 50] call FUNC(adjustRange);
@ -69,7 +62,7 @@
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(FUNC(canUseFCS)) exitWith {false};
if !([] call FUNC(canUseFCS)) exitWith {false};
// Statement
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -50] call FUNC(adjustRange);