mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
CSW - Fix loading with ammo from vehicle cargo (#8995)
Co-authored-by: GhostIsSpooky <LinkIsParking@hotmail.com>
This commit is contained in:
parent
b47b8014e7
commit
4943b2119d
@ -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");};
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user