Launcher removal

This commit is contained in:
IT07 2016-08-28 11:56:28 +02:00
parent 562cfa4d39
commit 2260246a89

View File

@ -21,7 +21,21 @@ if ( _ms0 isEqualTo "yes" ) then
{
if ( _x in _mssls ) then { _t removeMagazineGlobal _x };
} forEach ( magazines _t );
};
} else
{
{
_xx = _x;
{
_xxx = _x;
if ( _xxx isKindOf [ "Launcher", ( configFile >> "CfgWeapons" ) ] ) then
{
clearWeaponCargoGlobal _xx;
_mssls = getArray ( configFile >> "cfgWeapons" >> _xxx >> "magazines" );
{ if ( _x in _mssls ) then { _t removeMagazineGlobal _x } } forEach ( magazines _t );
};
} forEach ( weaponCargo _xx );
} forEach ( nearestObjects [ _t, [ "GroundWeaponHolder", "WeaponHolderSimulated" ], 3.5 ] );
};
};
if ( _ms2 isEqualTo "yes" ) then { removeHeadGear _t };