Skip to content

Commit e9db54c

Browse files
authored
Fixed UGLs not working with magazineWell (#465)
Allows any modded UGL to shoot compatible smoke and illumination rounds. Fixes occassional issues where magazine classnames and magazineWell entires are not identical. RHS and CUP I'm looking at you!
1 parent 5867dd4 commit e9db54c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

addons/main/functions/UnitAction/fnc_doUGL.sqf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,17 @@ private _unit = _units findIf {
4141
// find flares
4242
if (_muzzle isNotEqualTo "") then {
4343
private _findFlares = getArray (configFile >> "CfgWeapons" >> _weapon >> _muzzle >> "magazines");
44-
_findFlares = _findFlares arrayIntersect (magazines _x);
44+
45+
// add more magazines from magazineWell feature
46+
private _magazineWell = getArray (configFile >> "CfgWeapons" >> _weapon >> _muzzle >> "magazineWell");
47+
{
48+
private _ammoTypes = configProperties [configFile >> "CfgMagazineWells" >> _x];
49+
{
50+
_findFlares append (getArray _x);
51+
} forEach _ammoTypes;
52+
} forEach _magazineWell;
53+
54+
_findFlares = (_findFlares apply {toLower _x}) arrayIntersect ((magazines _x) apply {toLower _x});
4555
if (_findFlares isEqualTo []) exitWith {false};
4656

4757
// sort flares

0 commit comments

Comments
 (0)