
//Code taken from D4T, by DBThanatos

Actor SmokeGrenadeProjectile//D4GasGrenade
{
	PROJECTILE
	-NOGRAVITY
	+FORCERADIUSDMG
//	+EXTREMEDEATH
	+MTHRUSPECIES
	+doombounce
	Radius 4
	Height 9
	Damage 1
	Speed 35
	Mass 0
//	Gravity 0.25//0.1
//	ReactionTime 20
	SeeSound "HEGRENADE/BOUNCE"
  ReactionTime 60
	Scale 0.2
//	Translation "80:111=%[0,0,0]:[1,0.5,0]", "176:192=%[0,0,0]:[1,2,0]"
	States
	{
	Spawn:
		W35X ABCDEFGH 3 Bright A_CountDown
		TNT1 A 0 A_CountDown
		Loop
		//GRNL A 1 Bright //A_SpawnItemEx("GrenadeTrail",0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION)
		//GRNL A 0 A_CountDown
		//Loop
	Death:
		TNT1 A 0 A_PlaySound("SmokeGrenade/Explode",CHAN_AUTO,1.0,false,0.9)
		TNT1 A 0 A_PlaySound("sg_explode/Distant", 7)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),     0,   0,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),    32,   0,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),   -32,   0,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),     0,   32,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),    32,   32,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),   -32,   32,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),     0,  -32,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),    32,  -32,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 0 A_SpawnItemEx("D4Gas", random(0,-15),   -32,  -32,  0,0,0, 0, SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
		TNT1 A 10
		Stop
	}
}


Actor D4Gas
{
	+NOINTERACTION
	RenderStyle Add
	+FORCEXYBILLBOARD
	+BLOODLESSIMPACT
	+PAINLESS
	+BRIGHT
	+MTHRUSPECIES
	Scale 1.4
	Alpha 0.99
//	Translation "0:255=%[0,0,0]:[0.4,1,0]"
	States
	{
	Spawn:
		X101 A 0 NODELAY A_Jump(220,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		X101 ABCDEFGHIJKLMNOP 2 //A_Explode(5,80)
		Outer:
		X101 ABCDEFGHIJKLMNOP 2 A_FadeOut(0.03)
		Loop
	}
}

