CSW - Check carry mag exists (#7587)

Fix #7579
This commit is contained in:
PabstMirror
2020-03-11 18:42:21 -05:00
committed by GitHub
parent e89c172d34
commit 82116bd98b
5 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ private _allCarryMags = [];
private _xMag = _x;
private _carryMag = GVAR(vehicleMagCache) getVariable _xMag;
if (isNil "_carryMag") then {
private _groups = "getNumber (_x >> _xMag) == 1" configClasses (configFile >> QGVAR(groups));
private _groups = "getNumber (_x >> _xMag) == 1 && {isClass (configFile >> 'CfgMagazines' >> configName _x)}" configClasses (configFile >> QGVAR(groups));
_carryMag = configName (_groups param [0, configNull]);
GVAR(vehicleMagCache) setVariable [_x, _carryMag];
TRACE_2("setting cache",_xMag,_carryMag);