From b51c8e3161530b87276cb799b4cc23ddb0ba2980 Mon Sep 17 00:00:00 2001 From: Drofseh Date: Sat, 27 Nov 2021 18:17:44 -0800 Subject: [PATCH] use CBA_fnc_canAddItem only - use CBA_fnc_canAddItem only, requires #1528 --- addons/common/fnc_addMagazine.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/fnc_addMagazine.sqf b/addons/common/fnc_addMagazine.sqf index db16b0b49..e5771669e 100644 --- a/addons/common/fnc_addMagazine.sqf +++ b/addons/common/fnc_addMagazine.sqf @@ -49,7 +49,7 @@ if (!isClass _config || {getNumber (_config >> "scope") < 2}) exitWith { }; if (_verify) then { - if (_unit canAdd _item || {[_unit, _item, 1, true, true, true] call CBA_fnc_canAddItem}) then { // canAdd works for vehicles and units, CBA_fnc_canAddItem is more precise for units, but only try if canAdd fails for them + if ([_unit, _item, 1, true, true, true] call CBA_fnc_canAddItem) then { if (_ammo < 0) then { _unit addMagazine [_item, 1E6]; // addMagazine STRING is not synched when used on remote units. addMagazine ARRAY is. } else {