浏览代码

Merge pull request #98 from 501st-Aux-Mod-Team/emp_cluster

Emp cluster
Erliens 4 年之前
父节点
当前提交
090f6adc55

+ 3 - 3
addons - Copy/RD501_EMP/fn_onhitemp.sqf

@@ -24,7 +24,7 @@ params["_target", "_shooter", "_ammo","_projectile"];
 if ((getText(configFile >> "CfgAmmo" >> _ammo >> "simulation") != "shotBullet") && ((_projectile distance _target) > getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange"))) exitWith {/*systemChat "Out of range"*/}; 
 
 private _weaponsTarget = weapons _target;
-private _fryOnEMP = false;
+_fryOnEMP = false;
 
 if (_target getVariable["JLTS_EMPCooldown",CBA_missionTime - 1] < CBA_missionTime) then {
 
@@ -129,12 +129,12 @@ if (_target getVariable["JLTS_EMPCooldown",CBA_missionTime - 1] < CBA_missionTim
 
 	if (_toFry) then {
 		
-		[_target] spawn {
+		[_target, _fryOnEMP] spawn {
 			private _timeOfHit = CBA_missionTime;
 			private _useDefaultSounds = missionNamespace getVariable["JLTS_emp_useDefaultSounds",true];
 
 			
-			params ["_target"];
+			params ["_target", "_fryOnEMP"];
 			private _uniform = uniform _target;
 			_target stop true;
 

+ 5 - 1
addons - Copy/RD501_Vehicle_Weapons/aircraft/bombs/config.cpp

@@ -17,9 +17,9 @@ class CfgPatches
 		units[]={};
 		weapons[]={
 			macro_new_weapon(bomb,cluster),
+			macro_new_weapon(bomb,cluster_emp),
 			macro_new_weapon(bomb,SDB),
 			macro_new_weapon(bomb,LGB)
-			
 		};
 	};
 };
@@ -39,6 +39,10 @@ class CfgWeapons
 		salvo = 4;
 		magazineReloadTime = 5;
 	};
+	class macro_new_weapon(bomb,cluster_emp): macro_new_weapon(bomb,cluster)
+	{
+		magazines[] = {macro_new_mag(cluster_emp,4)};
+	};
 	class macro_new_weapon(bomb,SDB) : weapon_SDBLauncher //RD501_Bomb_SDB_Launcher
 	{
 		magazines[] = {macro_new_mag(sdb_bomb,4)};

+ 55 - 1
addons - Copy/RD501_Vehicle_Weapons/config.cpp

@@ -108,13 +108,22 @@ class CfgMagazines
 		ammo = macro_new_ammo(cluster_bomb)
 		count = 4;
 		DisplayName = "Thunderstorm CB";
-		displayNameShort  = "Thunderstorm CB";
+		displayNameShort = "Thunderstorm CB";
 		tracersEvery=1;
 	};
 	class macro_new_mag(cluster_bomb,2) : macro_new_mag(cluster_bomb,4)
 	{
 		count = 2;
 	};
+
+	class macro_new_mag(cluster_emp,2) : macro_new_mag(cluster_bomb,4)
+	{
+		ammo = macro_new_ammo(cluster_emp)
+		DisplayName = "Lightning EMP CB";
+		displayNameShort = "Lightning EMP CB";
+		count = 2;
+	};
+
 	class macro_new_mag(sdb_bomb,4) : PylonRack_Bomb_SDB_x4
 	{
 		ammo = macro_new_ammo(sdb_bomb)
@@ -261,6 +270,51 @@ class CfgAmmo
 		indirectHit =325;
 		indirectHitRange = 6;
 	};
+
+	class Mo_cluster_Bomb_02_F;
+	class macro_new_ammo(cluster_emp_sub): Mo_cluster_Bomb_02_F
+	{
+		hit = 0.1;
+		indirectHit = 0.01;
+		indirectHitRange=40;
+		JLTS_isEMPAmmo=1;
+		explosionEffects="JLTS_fx_exp_EMP";
+		SoundSetExplosion[]=
+		{
+			"JLTS_GrenadeEMP_Exp_SoundSet",
+			"JLTS_GrenadeEMP_Tail_SoundSet",
+			"Explosion_Debris_SoundSet"
+		};
+		class CamShakeExplode
+		{
+			distance=10;
+			duration=1;
+			frequency=20;
+			power=0;
+		};
+	};
+	class macro_new_ammo(cluster_emp) : BombCluster_02_Ammo_F
+	{
+		DisplayName = "Lightning EMP CB";
+		displayNameShort  = "Lightning EMP CB";
+		muzzleEffect = "";
+		tracerColor[] = {"blue"};
+		brightness = 20000;
+		lightColor[] = {0, 0, 1, 1};
+		triggerTime = 0.1;
+		hit = 50;
+		indirectHitRange = 0;
+		submunitionAmmo[]=
+		{
+			macro_new_ammo(cluster_emp_sub),
+			1.0
+		};
+		submunitionConeType[]=
+		{
+			"randomcenter",
+			45
+		};
+	};
 	class macro_new_ammo(sdb_bomb) : ammo_Bomb_SDB
 	{
 		DisplayName = "Wrath PGB";

+ 5 - 1
addons - Copy/RD501_Vehicles/air/Y_Wing/config.cpp

@@ -197,6 +197,7 @@ class CfgVehicles
 			macro_new_weapon(bomb,SDB),
 			macro_new_weapon(bomb,LGB),
 			macro_new_weapon(bomb,cluster),
+			macro_new_weapon(bomb,cluster_emp),
 			macro_new_weapon(bomb,carpet_I)
 		};
 		magazines[] = {
@@ -219,6 +220,7 @@ class CfgVehicles
 			macro_new_mag(cluster_bomb,4),
 			macro_new_mag(cluster_bomb,4),
 		 	macro_new_mag(cluster_bomb,4),
+		 	macro_new_mag(cluster_emp,2),
 			macro_new_mag(sdb_bomb,4),
 			macro_new_mag(sdb_bomb,4),
 			macro_new_mag(sdb_bomb,4),
@@ -1120,6 +1122,7 @@ class CfgVehicles
 			macro_new_weapon(wynd,agm),
 			macro_new_weapon(wynd,ugm),
 			macro_new_weapon(bomb,cluster),
+			macro_new_weapon(bomb,cluster_emp),
 			macro_new_weapon(bomb,SDB),
 			macro_new_weapon(bomb,LGB),
 		};
@@ -1137,6 +1140,7 @@ class CfgVehicles
 			macro_new_mag(cluster_bomb,4),
 			macro_new_mag(cluster_bomb,4),
 			macro_new_mag(cluster_bomb,4),
+			macro_new_mag(cluster_emp,2),
 			macro_new_mag(sdb_bomb,4),
 			macro_new_mag(sdb_bomb,4),
 			macro_new_mag(sdb_bomb,4),
@@ -1145,4 +1149,4 @@ class CfgVehicles
 			macro_new_mag(lgb_bomb,4)
 		};
 	};
-};
+};