ACE3/addons/fcs/functions/fnc_onForceUpdate.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

29 lines
551 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: ACE-Team
*
*
* Arguments:
* Nothing
*
* Return Value:
* None
*
* Example:
* call ace_fcs_fnc_onForceUpdate
*
* Public: No
*/
params ["_unit"];
private _vehicle = vehicle _unit;
if !([_unit, _vehicle, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
private _turret = [_unit] call EFUNC(common,getTurretIndex);
[_vehicle, _turret] call FUNC(keyDown);
[_vehicle, _turret] call FUNC(keyUp);