Merge pull request #6987 from acemod/fix-magwells-rearm

Fix rearming for vehicles using magazine wells
This commit is contained in:
commy2 2019-05-11 08:38:33 +02:00 committed by GitHub
commit 588ffba0a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,6 @@ if (!_magLoadedInWeapon) then {
{
_vehicle addMagazineTurret [_magazineClass, _turretPath, _x];
} forEach _ammoCounts;
} else {
/* Special hack case:
* The magazine class was loaded into a weapon. If the weapon has more than one type of
@ -58,7 +57,7 @@ if (!_magLoadedInWeapon) then {
* To prevent that, we must remove all magazines that would fit into the weapon and then add
* them back with the magazine-to-be-loaded being the first. */
private _allowedMagClassesInWeapon = getArray (configFile >> "CfgWeapons" >> _loadedWeapon >> "magazines");
private _allowedMagClassesInWeapon = [_loadedWeapon] call CBA_fnc_compatibleMagazines;
/* Current ammo counts of all allowed magazine classes in weapon.
* Example: [["8Rnd_82mm_Mo_shells", [8, 8, 2]], ["8Rnd_82mm_Mo_Flare_white", [7]]] */