CSW - Fix loading with ammo from vehicle cargo (#8995)

Co-authored-by: GhostIsSpooky <LinkIsParking@hotmail.com>
This commit is contained in:
GhostIsSpooky 2022-08-14 13:09:01 -03:00 committed by GitHub
parent b47b8014e7
commit 4943b2119d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -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");};

View File

@ -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);