diff --git a/addons/fcs/XEH_clientInit.sqf b/addons/fcs/XEH_clientInit.sqf index f5131dd135..3338e739e1 100644 --- a/addons/fcs/XEH_clientInit.sqf +++ b/addons/fcs/XEH_clientInit.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" GVAR(enabled) = false; -GVAR(ACE_time) = 0; +GVAR(time) = 0; GVAR(position) = [0,0,0]; if (!hasInterface) exitWith {}; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index ff382a68f0..cea7196570 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -22,7 +22,7 @@ _distance = call FUNC(getRange); if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {}; GVAR(Enabled) = true; -GVAR(ACE_time) = ACE_time; +GVAR(time) = ACE_time; if (_distance == 0) then { _distance = [5, 5000, 0] call EFUNC(common,getTargetDistance); // maximum distance: 5000m, 5m precision diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index 1e831d6df3..ca4b791a7c 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -60,7 +60,7 @@ private ["_movingAzimuth", "_posTarget", "_velocityTarget"]; // MOVING TARGETS _movingAzimuth = 0; -if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) then { +if (ACE_time - GVAR(time) > 1 and GVAR(time) != -1 and count _this < 3) then { // calculate speed of target _posTarget = [ (getPos _vehicle select 0) + _distance * (_weaponDirection select 0), @@ -68,9 +68,9 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) (getPos _vehicle select 2) + _distance * (_weaponDirection select 2) ]; _velocityTarget = [ - ((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(ACE_time)), - ((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(ACE_time)), - ((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(ACE_time)) + ((_posTarget select 0) - (GVAR(position) select 0)) / (ACE_time - GVAR(time)), + ((_posTarget select 1) - (GVAR(position) select 1)) / (ACE_time - GVAR(time)), + ((_posTarget select 2) - (GVAR(position) select 2)) / (ACE_time - GVAR(time)) ]; private ["_magazineType", "_ammoType", "_initSpeed", "_airFriction", "_timeToLive", "_simulationStep", "_initSpeedCoef", "_velocityMagnitude"]; @@ -90,7 +90,7 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) if (_initSpeedCoef > 0) then { _initSpeed = _initSpeedCoef; }; - + if (_simulationStep != 0) then { private ["_posX", "_velocityX", "_velocityY", "_timeToTarget"]; @@ -130,7 +130,7 @@ if (ACE_time - GVAR(ACE_time) > 1 and GVAR(ACE_time) != -1 and count _this < 3) }; }; GVAR(enabled) = false; -GVAR(ACE_time) = -1; +GVAR(time) = -1; private ["_viewDiff", "_FCSAzimuth", "_FCSMagazines", "_FCSElevation"]; @@ -157,7 +157,7 @@ _FCSElevation = []; _maxElev = getNumber (_turretConfig >> "maxElev"); _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammoType >> "airFriction"); - + { private ["_weapon", "_muzzles", "_weaponMagazines", "_muzzleMagazines"]; _weapon = _x; @@ -179,7 +179,7 @@ _FCSElevation = []; }; }; } forEach _weapons; - + _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance]; _offset = parseNumber _offset; @@ -209,4 +209,4 @@ if(_playSound) then { if(_showHint) then { [format ["%1: %2", localize LSTRING(ZeroedTo), _distance]] call EFUNC(common,displayTextStructured); -}; \ No newline at end of file +};