diff --git a/addons/csw/functions/fnc_ai_reload.sqf b/addons/csw/functions/fnc_ai_reload.sqf index fea3f196d02..f4d69b03c4f 100644 --- a/addons/csw/functions/fnc_ai_reload.sqf +++ b/addons/csw/functions/fnc_ai_reload.sqf @@ -72,7 +72,7 @@ private _bestAmmoToSend = -1; _bestAmmoToSend = _xAmmo; }; }; -} forEach (if (_reloadSource isKindOf "CaManBase") then {magazinesAmmo _reloadSource} else {magazinesAmmoCargo _reloadSource}); +} forEach (if (_reloadSource isKindOf "CAManBase") then {magazinesAmmo _reloadSource} else {magazinesAmmoCargo _reloadSource}); TRACE_4("",_reloadSource,_reloadMag,_reloadNeededAmmo,_bestAmmoToSend); if (_bestAmmoToSend == -1) exitWith {ERROR("No ammo");}; diff --git a/addons/csw/functions/fnc_reload_loadMagazine.sqf b/addons/csw/functions/fnc_reload_loadMagazine.sqf index 9d3f6fcb9e8..5cceb55113e 100644 --- a/addons/csw/functions/fnc_reload_loadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_loadMagazine.sqf @@ -45,7 +45,7 @@ private _onFinish = { _bestAmmoToSend = _xAmmo; }; }; - } forEach (magazinesAmmo _magSource); + } forEach (if (_magSource isKindOf "CAManBase") then {magazinesAmmo _magSource} else {magazinesAmmoCargo _magSource}); if (_bestAmmoToSend == -1) exitWith {ERROR_2("No ammo [%1 - %2]?",_xMag,_bestAmmoToSend);}; [_magSource, _carryMag, _bestAmmoToSend] call EFUNC(common,removeSpecificMagazine); @@ -57,11 +57,11 @@ private _onFinish = { [ -TIME_PROGRESSBAR(_timeToLoad), -[_vehicle, _turret, _carryMag, _magSource], -_onFinish, -{TRACE_1("load progressBar fail",_this);}, -_displayName, -{((_this select 0) call FUNC(reload_canLoadMagazine)) select 0}, -["isNotInside"] + TIME_PROGRESSBAR(_timeToLoad), + [_vehicle, _turret, _carryMag, _magSource], + _onFinish, + {TRACE_1("load progressBar fail",_this);}, + _displayName, + {((_this select 0) call FUNC(reload_canLoadMagazine)) select 0}, + ["isNotInside"] ] call EFUNC(common,progressBar);