From 2260246a89d289bc0c174e178e4164d4cd457fd3 Mon Sep 17 00:00:00 2001 From: IT07 Date: Sun, 28 Aug 2016 11:56:28 +0200 Subject: [PATCH] Launcher removal --- a3_vemf_reloaded/sqf/handleKillCleanup.sqf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/a3_vemf_reloaded/sqf/handleKillCleanup.sqf b/a3_vemf_reloaded/sqf/handleKillCleanup.sqf index 3a92350..f04dd67 100644 --- a/a3_vemf_reloaded/sqf/handleKillCleanup.sqf +++ b/a3_vemf_reloaded/sqf/handleKillCleanup.sqf @@ -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 };