
ACTOR RifleCaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("EmptyBrass",1,0,random(-80,-100),2,random(45,80))
		Stop
	}
}


ACTOR PistolCaseSpawn : RifleCaseSpawn
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("PistolCasing",0,0,random(-80,-100),2,random(40,60))
		Stop
	}
} 


ACTOR ShotCaseSpawn : RifleCaseSpawn
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("ShotgunCasing",0,0,random(-80,-100),2,random(40,60))
		Stop
	}
} 

Actor SSGCaseSpawner : ShotcaseSpawn
{
		States
		{
		Spawn:
			TNT1 A 0
			TNT1 A 0 Thing_ChangeTID(0,390)
				TNT1 A 1
				Goto Death
		Death:
				TNT1 A 0 A_CustomMissile("ShotgunCasing",0,0,random(80,100),2,random(50,70))
				Stop
		}
}


ACTOR 50CaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
        TNT1 A 0
		
		TNT1 A 1 A_CustomMissile("EmptyBrass",-2,0,random(80,100),2,random(40,80))
		TNT1 A 1 A_CustomMissile("MGLinks",-4,0,random(80,100),2,random(40,80))
		Stop
	}
}

ACTOR 50CaseSpawn2: 50CaseSpawn
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("EmptyBrass",-2,0,random(-80,-100),2,random(40,80))
		TNT1 A 1 A_CustomMissile("MGLinks",-4,0,random(-80,-100),2,random(40,80))
		Stop
	}
}


ACTOR MastermindCaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("20mmBrass",-5,0,random(-80,-100),2,random(45,80))
		Stop
	}
}

ACTOR AutoCannonCaseSpawn: MastermindCaseSpawn
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("40mmBrass",-5,0,random(-80,-100),2,random(30,50))
		Stop
	}
}


ACTOR EmptyBrass
{
   Height 2
   Radius 2
   Speed 6
   Scale 0.15
   +DOOMBOUNCE
   -CANBOUNCEWATER
   - NOGRAVITY
   +WINDTHRUST
   +CLIENTSIDEONLY
   +MOVEWITHSECTOR
   +MISSILE
   +NOBLOCKMAP
   -DROPOFF
   +NOTELEPORT
   +FORCEXYBILLBOARD
   +NOTDMATCH
   +GHOST
   //+DONTSPLASH
   //+CANBOUNCEWATER
   +FLOORCLIP
   +THRUACTORS
   Mass 0
   BounceFactor 0.3
   DeathSound "weapons/casing"
   BounceSound "weapons/casing"
   States
   {
   Spawn:
      //CAS3 FGHABCDEFGHABCDEFGH 3 
	  TNT1 A 0
	  TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
	  CAS3 FFGGHHAABBCCDDEEFFGGHHAABBCCDDEEFFGGHH 1
	  CAS3 FFGGHHAABBCCDDEEFFGGHHAABBCCDDEEFFGGHH 1
      STOP

   Death:
       CAS3 I 0
	   TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
	   TNT1 A 0 ACS_ExecuteAlways(789, 0, 0, 0, 0)//Check Effects
      LCPJ A 0 A_Jump(256,"Rest1","Rest2","Rest3","Rest4","Rest5","Rest6","Rest7","Rest8")
      Goto Rest1
    Rest1:
      CAS3 I 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 I -1
      Loop
    Rest2:
      CAS3 J 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 J -1
      Loop
    Rest3:
      CAS3 K 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 K -1
      Loop
    Rest4:
      CAS3 L 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 L -1
      Loop
    Rest5:
      CAS3 M 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 M -1
      Loop
    Rest6:
      CAS3 I 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 I -1
      Loop
    Rest7:
      CAS3 J 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 J -1
      Loop
    Rest8:
      CAS3 K 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
	  CAS3 K -1
      Loop
	 
	Splash:
	TNT1 A 0
	TNT1 A 0 A_SpawnItem("UnderwaterEmptyBrass")
	Stop
	
	Stoping:
	TNT1 A 0
	Stop
   }
}




ACTOR PistolCasing: EMptyBrass
{
   
   Scale 0.1
   States
   {
   Spawn:
	  TNT1 A 0
	  
      CAS1 FFGGHHAABBCCDDEEFFGGHHAABBCCDDEEFFGGHH 1
      STOP

   Death:
       CAS1 I 0
	   TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
	   TNT1 A 0 ACS_ExecuteAlways(789, 0, 0, 0, 0)//Check Effects
      LCPJ A 0 A_Jump(256,"Rest1","Rest2","Rest3","Rest4","Rest5")
      Goto Rest1
    Rest1:
      CAS1 I 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest2:
      CAS1 J 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest3:
      CAS1 K 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest4:
      CAS1 L 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest5:
      CAS1 M 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
	 
	Splash:
	TNT1 A 0
	TNT1 A 0 A_SpawnItem("UnderwaterEmptyBrass")
	Stop
	
	Stoping:
	TNT1 A 0
	Stop
   }
}





ACTOR MGLinks: EMptyBrass
{
   
   Scale 0.25
   States
   {
   Spawn:
	  TNT1 A 0
	  
      CLIN ABCDEFGHABCDEFGHABCDEFGHABCDEFGH 1
      STOP

   Death:
       CLIN A 0
	   TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
	   TNT1 A 0 ACS_ExecuteAlways(789, 0, 0, 0, 0)//Check Effects
      LCPJ A 0 A_Jump(256,"Rest1","Rest2","Rest3","Rest4","Rest5")
      Goto Rest1
    Rest1:
      CLIN F 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest2:
      CLIN B 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest3:
      CLIN F 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest4:
      CLIN B 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest5:
      CLIN F 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
	 
	Splash:
	TNT1 A 0
	Stop
	
	Stoping:
	TNT1 A 0
	Stop
   }
}


ACTOR 20mmBrass: EmptyBrass
{
Gravity 0.8
Speed 12
Scale 0.5
}


ACTOR 40mmBrass: EmptyBrass
{
Gravity 0.8
Speed 12
Scale 0.8
DeathSound "40mmcasing"
BounceSound "None"
}



ACTOR underwaterEmptyBrass: EmptyBrass
{
   Speed 0
   -BOUNCEONWALLS
   Mass 1
   DeathSound "none"
   BounceSound "none"
   States
   {
   Spawn:
      BLUD C 0 ThrustThingZ (0,7,1,0)
      CAS3 ABCD 3 
	  BLUD C 0 ThrustThingZ (0,7,1,0)
	  CAS3 EFGH 3
	  BLUD C 0 ThrustThingZ (0,7,1,0)
      CAS3 ABCD 3 
	  BLUD C 0 ThrustThingZ (0,7,1,0)
	  CAS3 EFGH 3
	   TNT1 A 0 A_SpawnItem("BUBULZ")
      Loop
   }
}

ACTOR ShotgunCasing
{
   Height 2
   Radius 2
   Speed 6
   Scale 0.25
   +DOOMBOUNCE
   -CANBOUNCEWATER
   - NOGRAVITY
   +WINDTHRUST
   +CLIENTSIDEONLY
   +MOVEWITHSECTOR
   +MISSILE
   +NOBLOCKMAP
   -DROPOFF
   +NOTELEPORT
   +FORCEXYBILLBOARD
   +NOTDMATCH
   +GHOST
   //+CANBOUNCEWATER
   //+DONTSPLASH
   Mass 2
   BounceFactor 0.3
   DeathSound "weapons/shell"
   BounceSound "weapons/shell"
   States
   {
    Spawn:
      CAS2 AABBCCDDEEFFGGHHAABBCCDDEEFFGGHH 1 A_CustomMissile("CasingSmoke", 0, 0, random(0, 360), 2, random(85, 90))
      Stop
   Death:
	  TNT1 A 0
	  TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
	  TNT1 A 0 ACS_ExecuteAlways(789, 0, 0, 0, 0)//Check Effects
	  TNT1 A 0 A_SpawnItem("Micro_SmokeColumn")
      LCPJ A 0 A_Jump(256,"Rest1","Rest2","Rest3","Rest4","Rest5","Rest6","Rest7","Rest8")
      Goto Rest1
    Rest1:
      CAS2 I 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest2:
      CAS2 J 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest3:
      CAS2 K 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest4:
      CAS2 L 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest5:
      CAS2 M 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest6:
      CAS2 I 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest7:
      CAS2 J 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
    Rest8:
      CAS2 K 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
   Loop
   
	Stoping:
		TNT1 A 0
		Stop
   }
}


ACTOR EmptyClip
{
   Height 2
   Radius 2
   Speed 4
   Scale 1.01
   +DOOMBOUNCE
   - NOGRAVITY
   +WINDTHRUST
   +CLIENTSIDEONLY
   +MOVEWITHSECTOR
   +MISSILE
   +NOBLOCKMAP
   -DROPOFF
   +NOTELEPORT
   +FORCEXYBILLBOARD
   +NOTDMATCH
   +GHOST
   BounceFactor 0.3
   Mass 1
   DeathSound "weapons/largemagdrop"
   BounceSound "weapons/largemagdrop"
   States
   {
   Spawn:
      TNT1 A 7 A_PlaySound("NULL")
      ECLI ABCDEFGHABCDEFGHABCDEFGHABCDEFGHABCDEFGH 4
      Stop
   Death:
	  TNT1 A 0
	  TNT1 A 0 ACS_ExecuteAlways(798, 0, 0, 0, 0)//Check Effects
	  TNT1 A 0 ACS_ExecuteAlways(789, 0, 0, 0, 0)//Check Effects
      ECLI G 200
	  TNT1 A 0 A_JumpIfInventory("LowGraphicsMode", 1, "Stoping")
      Loop
	Stoping:
		TNT1 A 0
		Stop
   }
}



ACTOR EmptyRocketChamber
{
   Height 2
   Radius 2
   Speed 4
   Scale 0.9
   +DOOMBOUNCE
   - NOGRAVITY
   +WINDTHRUST
   +CLIENTSIDEONLY
   +MOVEWITHSECTOR
   +MISSILE
   +NOBLOCKMAP
   -DROPOFF
   +NOTELEPORT
   +FORCEXYBILLBOARD
   +NOTDMATCH
   +GHOST
   Mass 1
   BounceFactor 0.3
   DeathSound "weapons/barrelpain"
   BounceSound "weapons/barrelpain"
   States
   {
   Spawn:
      TNT1 A 7 A_PlaySound("NULL")
      RCSE ABCDEFGHABCDEFGHABCDEFGHABCDEFGHABCDEFGH 4
      Stop
   Death:
      RCSE G 600
      Loop
   }
}


ACTOR EmptyCell
{
   Height 2
   Radius 2
   Speed 4
   Scale 0.7
   +DOOMBOUNCE
   - NOGRAVITY
   +WINDTHRUST
   +CLIENTSIDEONLY
   +MOVEWITHSECTOR
   +MISSILE
   +NOBLOCKMAP
   -DROPOFF
   +NOTELEPORT
   +FORCEXYBILLBOARD
   +NOTDMATCH
   BounceFactor 0.3
   +GHOST
   Mass 1
   DeathSound "weapons/largemagdrop"
   BounceSound "weapons/largemagdrop"
   States
   {
   Spawn:
      TNT1 A 7 A_PlaySound("NULL")
      ECEL ABCDEFGHABCDEFGHABCDEFGHABCDEFGHABCDEFGH 4
      Stop
   Death:
      ECEL A 600
      Loop
   }
}


ACTOR RocketCaseSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("EmptyRocketChamber",0,0,random(-80,-100),2,random(40,60))
		Stop
	}
} 

ACTOR PlasmaCaseSpawn : RifleCaseSpawn
{
	States
	{
	Spawn:
        TNT1 A 0
		TNT1 A 1 A_CustomMissile("EmptyCell",0,0,random(-80,-100),2,random(40,60))
		Stop
	}
} 


ACTOR EmptyClipSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_CustomMissile("EmptyClip",1,0,random(85,95),2,1)
		Stop
	}
}