diff --git a/addons/common/functions/fnc_getGunner.sqf b/addons/common/functions/fnc_getGunner.sqf index 71191083e0..2980246504 100644 --- a/addons/common/functions/fnc_getGunner.sqf +++ b/addons/common/functions/fnc_getGunner.sqf @@ -16,6 +16,8 @@ private ["_vehicle", "_weapon"]; _vehicle = _this select 0; _weapon = _this select 1; +if (gunner _vehicle == _vehicle && {_weapon in weapons _vehicle}) exitWith {gunner _vehicle}; + private "_gunner"; _gunner = objNull; @@ -23,6 +25,6 @@ _gunner = objNull; if (_weapon in (_vehicle weaponsTurret _x)) exitWith { _gunner = _vehicle turretUnit _x; }; -} forEach allTurrets _vehicle; +} forEach allTurrets [_vehicle, true]; _gunner