// 45ACP Casings
ACTOR 45ACPCaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+dontsplash
	+notimefreeze
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_CustomMissile("45ACPCasing",8,4,random(-85,-95),2,random(10,20))
		Stop
	}
}

ACTOR 45ACPCaseSpawn2
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+dontsplash
	+notimefreeze
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_CustomMissile("45ACPCasing",8,4,random(85,95),2,random(10,20))
		Stop
	}
}

ACTOR 45ACPCasing
{
	Height 8
	Radius 6
	Speed 6
	Scale 0.14	
	Mass 1
	ReactionTime 60
	PROJECTILE
	BounceType "Doom"
	BounceFactor 0.5
	-NOGRAVITY
	+NOTIMEFREEZE
	+THRUACTORS
	+BOUNCEONFLOORS
	+MOVEWITHSECTOR
	+DROPOFF
	+NOTELEPORT
	+CLIENTSIDEONLY
	+FORCEXYBILLBOARD
	-DONTSPLASH
	BounceSound "Casing/Pistol"
	States
	{
	Spawn:
		CAS1 A 0 NoDelay A_SpawnItem("DisasterShotSmoke")
		"####" ABCDEFG 2 A_SpawnItem("CasingsSmoke")
		"####" H 2 A_Countdown
		Goto Spawn+1
	Death:
		"####" "#" 0 A_ChangeFlag("FLOORCLIP",TRUE)
		"####" I 0 A_Jump(64,2)
		Goto Stay
		"####" J 0
		"####" J 0
		Goto Stay
	Stay:
		"####" "#" 350
		"####" "#" 2 A_Fadeout(0.1,TRUE)
		Wait
	}
}

ACTOR 454CaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+dontsplash
	+notimefreeze
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_SpawnItemEx("454Casing", 0, -6, 0, 1, random(-6,6), random(-6,6), 150) 
		Stop
	}
}

ACTOR 454Casing : 45ACPCasing
{
	Scale 0.20	
	BounceSound "Casing/Rifle"
	States
	{
	Spawn:
		CAS1 A 0 NoDelay A_SpawnItem("DisasterShotSmoke")
		Goto Super::Spawn+1
	}
}


// Rifle Casings
ACTOR 762CaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+dontsplash
	+notimefreeze
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_CustomMissile("762Casing",8,4,random(-85,-95),2,random(10,20))
		Stop
	}
}

ACTOR 762Casing : 45ACPCasing
{
	Height 8
	Radius 6
	Speed 6
	Scale 0.15
	BounceFactor 0.4
	Mass 1
	ReactionTime 60
	BounceSound "Casing/Rifle"
	States
	{
	Spawn:
		CAS4 A 0 NoDelay A_SpawnItem("DisasterShotSmoke")
		Goto Super::Spawn+1
	}
}


// Shotgun Casings
ACTOR 12GCaseSpawn : 45ACPCaseSpawn
{
	States
	{
	Spawn:
		TNT1 A 1 
		TNT1 A 0 A_Jump(150,"Spawn2")
		TNT1 A 1 A_CustomMissile("12GRedCasing",2,4,random(-85,-95),2,random(70,90))
		Stop
	Spawn2:
		TNT1 A 1 A_CustomMissile("12GBlackCasing",2,4,random(-85,-95),2,random(70,90))
		Stop
	}
}

ACTOR 12GCaseSpawn2 : 45ACPCaseSpawn
{
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_Jump(150,"Spawn2")
		TNT1 A 1 A_CustomMissile("12GRedCasing",2,4,random(-85,-95),2,random(50,70))
		Stop
	Spawn2:
		TNT1 A 1 A_CustomMissile("12GBlackCasing",2,4,random(-85,-95),2,random(50,70))
		Stop
	}
}


ACTOR 12GRedCasing : 45ACPCasing
{
	Height 8
	Radius 6
	Speed 6
	Scale 0.16	
	BounceFactor 0.6
	Mass 1
	ReactionTime 60
	BounceSound "Casing/Shotgun"
	States
	{
	Spawn:
		CAS2 A 0 NoDelay A_SpawnItem("DisasterShotSmoke")
		Goto Super::Spawn+1
	}
}

ACTOR 12GBlackCasing : 45ACPCasing
{
	Height 8
	Radius 6
	Speed 6
	Scale 0.16	
	BounceFactor 0.6
	Mass 1
	ReactionTime 60
	BounceSound "Casing/Shotgun"
	States
	{
	Spawn:
		CAS3 A 0 NoDelay A_SpawnItem("DisasterShotSmoke")
		Goto Super::Spawn+1
	}
}

ACTOR 12GRedMineCasing
{
	Height 8
	Radius 6
	Speed 20
	Scale 0.14	
	Mass 1
	ReactionTime 60
	PROJECTILE
	BounceType "Doom"
	BounceFactor 0.5
	-NOGRAVITY
	+NOTIMEFREEZE
	+BOUNCEONFLOORS
	+MOVEWITHSECTOR
	+DROPOFF
	+NOTELEPORT
	+CLIENTSIDEONLY
	+FORCEXYBILLBOARD
	-DONTSPLASH
	BounceSound "Casing/Shotgun"
	States
	{
	Spawn:
		CAS2 A 0 NoDelay
		"####" ABCDEFG 2
		"####" H 2 A_Countdown
		Goto Spawn+1
	Death:
	Crash:
		"####" "#" 0 A_ChangeFlag("FLOORCLIP",TRUE)
		"####" I 0 A_SpawnItemEX("RedShotMine")
		Stop
	XDeath:
	TNT1 A 0 A_ChangeFlag("NoGravity",1)
	TNT1 A 0 A_CustomMissile("MineShotEffect",0,0,0,0)
	Stop
	}
}

ACTOR 12GRedMineCasingSoup : 12GRedMineCasing
{
    +NODAMAGETHRUST
    -BOUNCEONFLOORS
	States
	{
	Spawn:
		CAS2 A 0 NoDelay
		"####" ABCDEFG 2
		"####" H 2 A_Countdown
		Goto Spawn+1
	Death:
  Crash:
    FLFR A 0 A_SpawnItemEx("MineShotEffect",0,0,1,0,0,0,0,SXF_NOCHECKPOSITION,0)
    FLFR A 0 A_CheckFloor("CrashFloor")
    FLFR A 0 bright A_PlayWeaponSound("FLTHND")
    FLFR AAAAAAA 0 { A_SpawnItemEx("FlamethrowerSmoke", Random(-30, 30), Random(-20, 20), Random(10, -10), 0, 1, 2, 0, 128); A_Explode((1), 25, 0, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	Stop
  CrashFloor:
    FLFR A 0 bright A_PlayWeaponSound("FLTHND")
    FLFR AAAAAAA 0 { A_SpawnItemEx("FlamethrowerSmoke", Random(-30, 30), Random(-20, 20), Random(10, -10), 0, 1, 2, 0, 128); A_Explode((1), 25, 0, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	Stop
  XDeath:
    FLFR A 0 A_SpawnItemEx("MineShotEffect",0,0,1,0,0,0,0,SXF_NOCHECKPOSITION,0)
    FLFR A 0 bright A_PlayWeaponSound("FLTHND")
	FLFR A 0 A_SpawnItemEX("FlamethrowerSticky")
    FLFR AAAAAAA 0 { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128);}
    FLFR MNO 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128);}
    Stop
	}
}

ACTOR 12GBlackMineCasing
{
	Height 8
	Radius 6
	Speed 20
	Scale 0.14	
	Mass 1
	ReactionTime 60
	PROJECTILE
	BounceType "Doom"
	BounceFactor 0.5
	-NOGRAVITY
	+NOTIMEFREEZE
	+BOUNCEONFLOORS
	+MOVEWITHSECTOR
	+DROPOFF
	+NOTELEPORT
	+CLIENTSIDEONLY
	+FORCEXYBILLBOARD
	-DONTSPLASH
	BounceSound "Casing/Shotgun"
	States
	{
	Spawn:
		CAS3 A 0 NoDelay
		"####" ABCDEFG 2
		"####" H 2 A_Countdown
		Goto Spawn+1
	Death:
	Crash:
		"####" "#" 0 A_ChangeFlag("FLOORCLIP",TRUE)
		"####" I 0 A_SpawnItemEX("BlackShotMine")
		Stop
	XDeath:
	TNT1 A 0 A_ChangeFlag("NoGravity",1)
	TNT1 A 0 A_CustomMissile("MineShotEffect",0,0,0,0)
	Stop
	}
}

ACTOR 12GBlackMineCasingSoup : 12GBlackMineCasing
{
    +NODAMAGETHRUST
    -BOUNCEONFLOORS
	States
	{
	Spawn:
		CAS3 A 0 NoDelay
		"####" ABCDEFG 2
		"####" H 2 A_Countdown
		Goto Spawn+1
	Death:
  Crash:
    FLFR A 0 A_CheckFloor("CrashFloor")
    FLFR A 0 bright A_PlayWeaponSound("FLTHND")
    FLFR AAAAAAA 0 { A_SpawnItemEx("FlamethrowerSmoke", Random(-30, 30), Random(-20, 20), Random(10, -10), 0, 1, 2, 0, 128); A_Explode((1), 25, 0, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	Stop
  CrashFloor:
    FLFR A 0 bright A_PlayWeaponSound("FLTHND")
    FLFR AAAAAAA 0 { A_SpawnItemEx("FlamethrowerSmoke", Random(-30, 30), Random(-20, 20), Random(10, -10), 0, 1, 2, 0, 128); A_Explode((1), 25, 0, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 1 bright { A_SpawnItemEx("SmolDarkSmoke2",random(-8,8),random(-3,3),random(0,46),0,1,0.5,0,0,0); A_SpawnItemEx("FlamethrowerSmoke4", Random(-10, 10), Random(-10, 10), Random(10, -10), 0, 0, 4, 0, 128); A_Explode(5, 50, 1, 0, 10, 0);}
	Stop
  XDeath:
    FLFR A 0 bright A_PlayWeaponSound("FLTHND")
	FLFR A 0 A_SpawnItemEX("FlamethrowerSticky")
    FLFR AAAAAAA 0 { A_FadeOut(0.05,1); A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128);}
    FLFR MNO 1 bright { A_SpawnItemEx("FlamethrowerSmoke4", Random(-20, 20), Random(-20, 20), Random(10, -10), 0, 0, 4, 0, 128);}
    Stop
	}
}


// M79 Casings
ACTOR 60mmCaseSpawn : 45ACPCaseSpawn
{
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_CustomMissile("60mmCasing",2,4,random(-85,-95),2,random(70,90))
		Stop
	}
}

ACTOR 60mmCasing : 45ACPCasing
{
	Height 8
	Radius 6
	Speed 6
	Scale 0.20	
	BounceFactor 0.6
	Mass 1
	ReactionTime 60
	BounceSound "Casing/Rifle"
	States
	{
	Spawn:
		CAS5 A 0 NoDelay A_SpawnItem("DisasterShotSmoke")
		Goto Super::Spawn+1
	}
}

ACTOR 20mmCaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+dontsplash
	+notimefreeze
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_SpawnItemEx("20mmCasing", 0, -6, 0, 1, random(-6,6), random(-6,6), 150) 
		Stop
	}
}

ACTOR 20mmCasing : 45ACPCasing
{
	Scale 0.20	
	BounceSound "Casing/Rifle"
	States
	{
	Spawn:
		CAS6 A 0 NoDelay A_SpawnItem("DisasterShotSmoke")
		Goto Super::Spawn+1
	}
}

ACTOR 20mmCaseSpawn2
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+dontsplash
	+notimefreeze
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_CustomMissile("20mmCasing",8,4,random(85,95),2,random(10,20)) 
		Stop
	}
}

// Grenade Pin Casings
ACTOR PinCaseSpawn 
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+dontsplash
	+notimefreeze
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_CustomMissile("PinCasing",8,4,random(-85,-95),2,random(10,20))
		Stop
	}
}

ACTOR PinCasing : 45ACPCasing
{
    Scale 0.25
	BounceSound "Casing/Pistol"
	States
	{
	Spawn:
		CAS7 A 0 NoDelay
		"####" AABBCCDDEEFFGG 1
		"####" HH 1
		Goto Spawn+1
	}
}

// Bazooka Casings
ACTOR 85mmCaseSpawn : 45ACPCaseSpawn
{
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 1 A_CustomMissile("85mmCasing",2,4,random(-85,-95),2,random(60,70))
		Stop
	}
}

ACTOR 85mmCasing : 45ACPCasing
{
	Height 8
	Radius 6
	Speed 13
	Scale 0.20	
	BounceFactor 0.6
	Mass 1
	ReactionTime 60
	BounceSound "Casing/Nuke"
	States
	{
	Spawn:
		CAS8 A 0 NoDelay A_SpawnItem("CigSmoke")
		"####" ABCDEFG 5 A_SpawnItem("CasingsSmoke")
		"####" H 5 A_Countdown
		Goto Spawn+1
	Death:
		"####" "#" 0 A_ChangeFlag("FLOORCLIP",TRUE)
		"####" I 0 A_Jump(64,2)
		Goto Stay
		"####" J 0
		"####" J 0
		Goto Stay
	Stay:
		"####" "#" 350
		"####" "#" 2 A_Fadeout(0.1,TRUE)
		Wait
	}
}

ACTOR StimCasing : 45ACPCasing
{
	Height 8
	Radius 6
	Speed 13
	Scale 0.20	
	BounceFactor 0.6
	Mass 1
	ReactionTime 60
	BounceSound "Casing/Rifle"
	States
	{
	Spawn:
		CAS9 A 0 NoDelay //A_SpawnItem("CigSmoke")
		"####" ABCDEFG 5 //A_SpawnItem("CasingsSmoke")
		"####" H 5 A_Countdown
		Goto Spawn+1
	Death:
		"####" "#" 0 A_ChangeFlag("FLOORCLIP",TRUE)
		"####" I 0 A_Jump(64,2)
		Goto Stay
		"####" J 0
		"####" J 0
		Goto Stay
	Stay:
		"####" "#" 350
		"####" "#" 2 A_Fadeout(0.1,TRUE)
		Wait
	}
}
