Skip to content

Commit 498f298

Browse files
authored
Hellfire - Fix fire-mode selection for UAVs (#11237)
1 parent 5b2ce9a commit 498f298

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addons/hellfire/functions/fnc_setupVehicle.sqf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ private _fnc_statement = {
7777
_target setVariable [QEGVAR(missileguidance,attackProfile), _attackProfile];
7878
};
7979
private _fnc_condition = {
80-
params ["_target", "_player", "_attackProfile"];
80+
params ["_target", "", "_attackProfile"];
8181

82-
private _turretPath = if (ACE_player == (driver _target)) then {[-1]} else {ACE_player call CBA_fnc_turretPath};
82+
private _operator = if (isNull (ACE_controlledUAV select 0)) then {ACE_player} else {ACE_controlledUAV select 1};
83+
private _turretPath = if (_operator == (driver _target)) then {[-1]} else {_operator call CBA_fnc_turretPath};
8384
private _hasWeapon = ({(isNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled))) && {getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled)) > 0}} count (_target weaponsTurret _turretPath)) > 0;
8485

8586
(_hasWeapon) &&

0 commit comments

Comments
 (0)