diff --git a/addons/csw/functions/fnc_getLoadActions.sqf b/addons/csw/functions/fnc_getLoadActions.sqf index 2b28d2dbd6b..59b368b3686 100644 --- a/addons/csw/functions/fnc_getLoadActions.sqf +++ b/addons/csw/functions/fnc_getLoadActions.sqf @@ -32,7 +32,8 @@ private _condition = { params ["_target", "_player", "_args"]; _args params ["_carryMag", "_turretPath", "", "_magSource"]; - ([_target, _turretPath, _carryMag, _magSource] call FUNC(reload_canLoadMagazine)) select 0 + [_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew) && + {([_target, _turretPath, _carryMag, _magSource] call FUNC(reload_canLoadMagazine)) select 0} }; private _cfgMagazines = configFile >> "CfgMagazines"; // Micro-optimization diff --git a/addons/csw/functions/fnc_getUnloadActions.sqf b/addons/csw/functions/fnc_getUnloadActions.sqf index dd119b06226..03f99cd65de 100644 --- a/addons/csw/functions/fnc_getUnloadActions.sqf +++ b/addons/csw/functions/fnc_getUnloadActions.sqf @@ -46,7 +46,9 @@ private _statement = { private _condition = { params ["_target", "_player", "_args"]; _args params ["_vehMag", "_turretPath", "_carryMag"]; - [_target, _turretPath, _player, _carryMag, _vehMag] call FUNC(reload_canUnloadMagazine) + + [_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew) && + {[_target, _turretPath, _player, _carryMag, _vehMag] call FUNC(reload_canUnloadMagazine)} }; private _actions = []; diff --git a/addons/interaction/functions/fnc_canInteractWithVehicleCrew.sqf b/addons/interaction/functions/fnc_canInteractWithVehicleCrew.sqf index a314a8b601a..723882cce28 100644 --- a/addons/interaction/functions/fnc_canInteractWithVehicleCrew.sqf +++ b/addons/interaction/functions/fnc_canInteractWithVehicleCrew.sqf @@ -11,7 +11,7 @@ * Unit can interact with vehicle crew * * Example: - * [cursorObject, player] call ace_interaction_fnc_canInteractWithVehicleCrew + * [player, cursorObject] call ace_interaction_fnc_canInteractWithVehicleCrew * * Public: No */ diff --git a/addons/reload/functions/fnc_canCheckAmmo.sqf b/addons/reload/functions/fnc_canCheckAmmo.sqf index 96b9f88d501..829e57e2569 100644 --- a/addons/reload/functions/fnc_canCheckAmmo.sqf +++ b/addons/reload/functions/fnc_canCheckAmmo.sqf @@ -4,23 +4,24 @@ * Check if a unit can check the ammo of the target. * * Arguments: - * 0: Unit equipped with the weapon + * 0: Unit equipped with the weapon/CSW to check + * 1: Unit checking ammo * * Return Value: * Can check ammo * * Example: - * [cursorObject] call ace_reload_fnc_canCheckAmmo + * [cursorObject, player] call ace_reload_fnc_canCheckAmmo * * Public: No */ -params ["_target"]; +params ["_target", "_player"]; // Static weapons if (_target isKindOf "StaticWeapon") exitWith { // No check ammo action on destroyed static weapons - if (!alive _target) exitWith {false}; + if (!alive _target || {!([_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew))}) exitWith {false}; if (currentMagazine _target != "") exitWith {true};