add support for getting vehicle magazine from magwells

This commit is contained in:
Salluci 2023-07-24 00:34:51 +03:00
parent 3c767c6025
commit b51efb15fc

View File

@ -28,7 +28,6 @@ private _bestMag = "#";
private _bestMagCount = -1;
{
private _weapon = _x;
{
if ((getNumber (_carryGroupCfg >> _x)) == 1) then {
private _xAmmo = getNumber (configFile >> "CfgMagazines" >> _x >> "ammo");
@ -37,7 +36,7 @@ private _bestMagCount = -1;
_bestMagCount = _xAmmo;
};
};
} forEach (getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"));
} forEach (GVAR(compatibleVehicleMagsCache) get _x);
} forEach (_vehicle weaponsTurret _turret);
TRACE_3("best fit",_desiredAmmo,_bestMag,_bestMagCount);