ACTOR M45Shotgun : BrutalWeapon
{
	Game Doom
	SpawnID 27
	Weapon.SelectionOrder 1300
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive1 0
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "AmmoShell"
	Weapon.AmmoType2 "HaloShotgunAmmo"
	Inventory.PickupMessage "You got the M45 Shotgun! (Slot 3)"
    Inventory.PickupSound "HaloSelect"
	Obituary "You got the M45 Shotgun! (Slot 3)"
    AttackSound "None"
    +WEAPON.NOALERT
    +WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	Scale 0.9
	Tag "M45 Shotgun"
	States
	{
	
	KickingFlash:
	SH0P CDEFGHHHHHHGFEDC 1 //16
	stop
	
	AirKickingFlash:
	    SH0P CDEFGHHHHHHHHGFEDC 1 //18
	    stop
	
	 SlideKickingStart:
	    SH0P CDEFGH 1
	    SH0P HH 17 //39 total
	    Stop

	 SlideKickingEnd:
	    SH0P HHHHHGFEDC 1 //10
	    Stop
		
	KickingFlashReloading:
	SH0P HHHHHHHHHHHHHH 1 //14
	stop
		
    Spawn:
		SH0S G -1
		Stop
    	
		
	Fidget:
	   SH0P A 0 A_PlaySound("HaloPump")
	   SH0P BCDEFGHH 1
	   TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
	   SH0P HHHIJKLLLLMNO 1 A_WeaponReady 
	   TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
	   SH0P PQRSTUV 1 A_WeaponReady 
	   SHTN A 0 A_Takeinventory("Reloading",1)
	   Goto Ready
	   
	Select:
		SHTN A 0 A_Giveinventory("GoSpecial",1)
		SHTN A 0 A_Takeinventory("FistsSelected",1)
		SHTN A 0 A_Takeinventory("SawSelected",1)
		SHTN A 0 A_Giveinventory("ShotgunSelected",1)
		SHTN A 0 A_Takeinventory("SSGSelected",1)
		SHTN A 0 A_Takeinventory("MinigunSelected",1)
		SHTN A 0 A_Takeinventory("PlasmaGunSelected",1)
		SHTN A 0 A_Takeinventory("RocketLauncherSelected",1)
		SHTN A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		SHTN A 0 A_Takeinventory("BFGSelected",1)
		SHTN A 0 A_Takeinventory("BFG10kSelected",1)
		SHTN A 0 A_Takeinventory("RailGunSelected",1)
		SHTN A 0 A_Takeinventory("SubMachineGunSelected",1)
		SHTN A 0 A_Takeinventory("RevenantLauncherSelected",1)
		SHTN A 0 A_Takeinventory("LostSoulSelected",1)
		SHTN A 0 A_Takeinventory("FlameCannonSelected",1)
		SHTN A 0 A_Takeinventory("HasBarrel",1)
		SHTN A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 AAAAAAAAAAAA 0 A_Raise
		TNT1 AAA 1 A_Raise
		SHTN A 0 A_PlaySound("HaloSelect")

	SelectAnimation:
        TNT1 AAAA 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		SHTN A 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "PuristGun")
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        SH0S FEDCB 1 A_WeaponReady(WRF_NOFIRE) 
		SHTN A 0 A_GunFlash
		Goto Ready
		


	Ready3:	
	Ready:	
        SHTN A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SHTN A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SHTN A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SHTN A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SHTN A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SHTN A 0 A_JumpIfInventory("Unloading",1,"Unload")
		SHTN A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
	OkToFire:
		SH0S A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		SHTN A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		SHTN A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
        Goto Ready
		
		
	Ready2:
        SHTN A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SHTN A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SHTN A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SHTN A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SHTN A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SHTN A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		SHTN A 0 A_JumpIfInventory("Unloading",1,"Unload")
		SHTN A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		SHTN A 0 A_JumpIfInventory("FiredPrimary",1,"Fire")
		SHT8 A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Loop	
		
	
	Deselect:
		SHTN A 0 Offset(0,32)
		TNT1 A 0 A_SetCrosshair(0)
		SHTN A 0 A_Takeinventory("Zoomed",1)
		SHTN A 0 A_TakeInventory("TossGrenade", 1)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		SHTN A 0 A_Takeinventory("UseShotgunStrap",1)
        SHTN A 0 A_ZoomFactor(1.0)
		SH0S BCDEF 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Wait

		
    Fire:
	    TNT1 A 0 Offset(0,32)
        SHTN A 0 A_Takeinventory("Reloading",1)
		SHTN A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
        SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",1,2)
        Goto NoAmmo
        TNT1 AAAA 0
		SHTN A 0 A_JumpIfInventory("HaloShotgunWasEmpty", 1, "Pump2")
		SHTN A 0 A_ZoomFactor(0.96)
        SHTN A 0 A_AlertMonsters
        SHTN A 0 A_PlaySound("HaloFire", 1)
		RIFF A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
        SHTN A 0
		SHTN A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		TNT1 AAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles2", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-3,3), 0, 0, -12, 0, random(-3,3))
		SHTN A 0 A_Takeinventory("HaloShotgunAmmo",1)
		SHTN A 0 A_FireBullets (6, 2, 5, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTN A 0 A_FireBullets (3, 3, 5, 13, "ShotgunPuff2", FBF_NORANDOM)
		SH0F B 1 BRIGHT
		SHTN A 0 A_SetPitch(-6.0 + pitch, SPF_INTERPOLATE)
		SHTN A 0 A_ZoomFactor(1.00)
		SH0F C 1 A_SetPitch(+1.0 + pitch, SPF_INTERPOLATE)
		SH0F DE 1 A_SetPitch(+1.0 + pitch, SPF_INTERPOLATE)
		SH0F F 1 A_SetPitch(+3.0 + pitch, SPF_INTERPOLATE)
		SH0F GHH 1
		Goto Pump1
		
   Pump1:	
	   SHTN A 0
	   
	   SHTN A 0 A_GiveInventory ("Pumping", 1)
	   SHTN A 0 A_GiveInventory ("GoSpecial", 1)
	   SH0P A 0 A_PlaySound("HaloPump", 3)
	   SH0P ABCDEF 1 
	   SH0P GHHHHH 1 
	   SH0P I 1
	   SHTN A 0 A_FireCustomMissile("ShotCaseSpawn",40,0,3,-26)
	   SHTN A 0 A_WeaponReady(WRF_NOFIRE| WRF_NOBOB)//Allows quick switch
	   SHTN A 0 A_JumpIfInventory("TurboReload", 1, "PumpNoReload")//Tactical Mode is slower to pump
	   SH0P JK 1 A_JumpIfInventory("Reloading",1,"InsertingShells")
	   
	   SH0P LLLLM 1
	   SHTN A 0 A_Takeinventory("HaloShotgunWasEmpty",1)
	   SH0P NOP 1 A_JumpIfInventory("Reloading",1,"InsertingShells")
	   
	   SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",1,5)
	   SHTN A 0 A_JumpIfInventory("TurboReload", 1, 4)
	   SHTN A 0 A_Giveinventory("HaloShotgunWasEmpty",1)
	   SHTN A 0 A_JumpIfInventory("NoAutoReload", 1, 2)
	   Goto InsertingShells
	   TNT1 AA 0
	   
	   SH0P Q 1
	   SH0P RSTUVW 1 A_JumpIfInventory("Kicking",1,"DoKick")
	   SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",1,2)
	   SHTN A 0 A_JumpIfInventory("TurboReload", 1, "TurboReload")
	   SHTN A 0
	   Goto Ready
   
   Pump2:	
	   SHTN A 0
	   SHTN A 0 A_GiveInventory ("Pumping", 1)
	   SHTN A 0 A_GiveInventory ("GoSpecial", 1)
	   SHTN A 0 A_TakeInventory("Reloading", 1)
	   SHTN A 0 A_Takeinventory("Zoomed",1)
	   SHTN A 0 A_ZoomFactor(1.0)
	   S0R3 B 0 A_PlaySound("HaloPump2", 3)
	   S0R3 ABCDEEEEFGHI 1
	   SHTN A 0 A_Takeinventory("HaloShotgunWasEmpty",1)
	   SHTN A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
	   S0R3 JKLMNOP 1 A_JumpIfInventory("Kicking",1,"DoKick")
	   Goto Ready
	
	PumpNoReload:	
	   SHTN IJ 1
	   SHTN KL 1
	   SHTN KJIH 1
	   SHTN A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
	   SHTN A 0 A_Takeinventory("HaloShotgunWasEmpty",1)
	   SHTN GFEDC 1 A_JumpIfInventory("Kicking",1,"DoKick")
	   SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",1,2)
	   SHTN A 0 A_JumpIfInventory("TurboReload", 1, "TurboReload")
	   SHTN A 0
	   Goto Ready
	
	
	
	AltFire:
	    RIFG A 0 A_JumpIfInventory("HaloShotgunAmmo",1,1)
		Goto NoAmmo
		
		AltFireStacks:
		TNT1 A 0
		RIFG A 0 A_JumpIfInventory("HaloShotgunAmmo",1,3)
		Goto AltActualFire
        TNT1 AAAAAA 0
        SHTN A 0 A_FireCustomMissile("ShotCaseSpawn",40,0,3,-26)
        SHTN A 0 A_FireBullets (7, 4, 8, 11, "ShotgunPuff", FBF_NORANDOM)
		RIFG A 0 A_Takeinventory("HaloShotgunAmmo",1)
		Goto AltFireStacks
		
	AltActualFire:
        SHTN A 0 A_Takeinventory("Reloading",1)
        TNT1 AAAA 0
		SHTN A 0 A_ZoomFactor(0.96)
        SHTN A 0 A_AlertMonsters
        SHTN A 0 A_PlaySound("HaloAlt", 1)
		RIFF A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
        SHTN A 0
		SHTN A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		TNT1 AAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles2", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-3,3), 0, 0, -12, 0, random(-3,3))
		SH0B B 1 BRIGHT A_SetPitch(-20.0 + pitch, SPF_INTERPOLATE)
		SHTN A 0 A_ZoomFactor(1.00)
		SH0B C 1 
		SH0B CDEF 1 A_SetPitch(+4.0 + pitch, SPF_INTERPOLATE)
		SH0B GH 1 A_SetPitch(+2.0 + pitch, SPF_INTERPOLATE)
		SH0B IJK 1
		Goto Ready

	CheckSprint:
		SHTN A 1 A_WeaponReady(WRF_NOFIRE)
		SHTN A 0 A_Takeinventory("Zoomed",1)
        SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		SHTN A 0 A_Giveinventory("GoSpecial",1)
		SHTN A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		SHTN A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready
		
	StartSprint:
		SHTN A 1 A_WeaponReady(WRF_NOFIRE)
		SHTN A 0 A_Takeinventory("Zoomed",1)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_JumpIfInventory("UsedStamina", 40, "StopSprintTired")
		
	Sprinting:	
		STRN A 0 offset(-9,32) 
		SHTN A 0 offset(-9,32) A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		SHTN A 0 offset(-9,32) A_JumpIfInventory("UsedStamina", 100, "StopSprintTired")
		PLAY A 0 offset(-9,32) ACS_ExecuteAlways(852, 0, 0, 0, 0)//Makes player faster.
		SHTN A 0 offset(-9,32) A_JumpIfInventory("PowerStrength", 1, 2)
		SHTN A 0 offset(-9,32) A_GiveInventory("UsedStamina", 5)
		SHTN A 0 offset(-9,32)
		SH0P A 1 offset(-9,34) A_SetPitch(pitch -0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(-6,36) A_SetPitch(pitch -0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(-3,38) A_SetPitch(pitch -0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(0,38) A_SetPitch(pitch -0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(3,36) A_SetPitch(pitch -0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(6,34) A_SetPitch(pitch -0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(9,32) A_SetPitch(pitch -0.5, SPF_INTERPOLATE)
		SHTN A 0 offset(9,32) A_WeaponReady(WRF_NOBOB)
		SHTN A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SHTN A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SHTN A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SHTN A 0 offset(-9,32) A_GiveInventory("UsedStamina", 5)
		SHTN A 0 offset(9,33) A_SpawnItemEx("FootStep", 0, 0, 2, 0, 0, -4)
		SH0P A 1 offset(9,34) A_SetPitch(pitch +0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(6,36) A_SetPitch(pitch +0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(3,38) A_SetPitch(pitch +0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(0,38) A_SetPitch(pitch +0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(-3,36) A_SetPitch(pitch +0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(-6,34) A_SetPitch(pitch +0.5, SPF_INTERPOLATE)
		SH0P A 1 offset(-9,32) A_SetPitch(pitch +0.5, SPF_INTERPOLATE)
		SHTN A 0 offset(-9,32) A_WeaponReady(WRF_NOBOB)
		SHTN A 0 offset(-9,32) A_JumpIfInventory("IsRunning", 1, "Sprinting")
		
		Goto StopSprint
	StopSprintTired:
		SHTN A 1
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		SHTN A 0 A_PlaySound("Tired", 2)
		SHTN A 0 A_TakeInventory("UsedStamina", 2)
		SHTN A 5 A_WeaponReady
		SHTN A 0 A_TakeInventory("UsedStamina", 2)
		SHTN A 5 A_WeaponReady
		SHTN A 0 A_TakeInventory("UsedStamina", 2)
		SHTN A 5 A_WeaponReady
		SHTN A 0 A_TakeInventory("UsedStamina", 2)
		SHTN A 5 A_WeaponReady
		SHTN A 0 A_TakeInventory("UsedStamina", 2)
		SHTN A 5 A_WeaponReady
		Goto Ready
	StopSprint:
		SH0P A 1
		SHTN A 0 A_JumpIfInventory("UsedStamina", 60, "StopSprintTired")
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		Goto Ready
	
		
	//RELOAD
	
	ReloadWithNoAmmoLeft:
    Reload:
	    SHTN A 0
		SHTN A 0 A_TakeInventory("Reloading", 1)
		SHTN A 0 A_JumpIfInventory("AmmoShell", 1, 2)
		Goto NoAmmo
		SHTN A 0
	    SHTN A 0 A_Takeinventory("Zoomed",1)
        SHTN A 0 A_ZoomFactor(1.0)
		S0R1 A 1 A_WeaponReady
		SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",13,"Fidget")
		SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo", 1, "ReloadNormally")//Check if there is a shell in the chamber
		SHTN A 0 A_GiveInventory("HaloShotgunWasEmpty", 1)//This means there is no shell in the chamber
	
	ReloadNormally:	
        SHTN A 0 A_JumpIfInventory("AmmoShell",1,1)//If there is no reserve ammo, don't reload, go back to Ready
        Goto Ready
		SHTN A 0 A_JumpIfInventory("TurboReload", 1, "TurboReload")//Check if reloads are disabled.
		S0R1 B 1 A_GiveInventory ("Pumping", 1)
		S0R1 CDEFGH 1
        
	 InsertingShells:
		SHTN A 0
		SHTN A 0 A_JumpIfInventory("AmmoShell",1,2)//if there are no more reserve shells, finish reload.
        Goto Pump2
		SHTN A 0
		SHTN A 0 A_GiveInventory ("Pumping", 1)
		SSHR A 0 A_TakeInventory("Reloading", 1)
        SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",12,"CheckIfFinishReload")
        SHTN A 0 A_Giveinventory("HaloShotgunAmmo",1)
		SHTN A 0 A_Takeinventory("AmmoShell",1)
        
	InsertShellAnimation:	
		SHTN A 0
		S0R2 A 0 A_PlaySound("HaloReload")
		S0R2 ABCDEFG 1
        S0R2 HHHIIJ 1
		S0R2 LKL 1 A_WeaponReady(WRF_NOBOB)
        SSHR A 0 A_JumpIfInventory("Reloading", 1, "Pump2")
        SHTN A 0 A_JumpIfInventory("Kicking",1,"DoKickReloading")
		SHTN A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",13,"FinishedInsertingShells")//If there are 8+1 shells, stop it immediately
        Goto InsertingShells
		
	CheckIfFinishReload:
		S0R2 A 1
		SHTN A 0 A_JumpIfInventory("HaloShotgunWasEmpty", 1, "FinishedInsertingShells")//If shotgun was empty, 
		//Play the insert shell animation again, and insert the 9th shell
		SHTN A 0 A_JumpIfInventory("AmmoShell",1,1)//if there are no more reserve shells, finish reload.
        Goto Pump2
		SHTN A 0 A_Giveinventory("HaloShotgunAmmo",1)
		SHTN A 0 A_Takeinventory("AmmoShell",1)
        Goto InsertShellAnimation
		
	FinishedInsertingShells:
		SHTN A 0 A_Takeinventory("Reloading",1)
		SHTN A 0 A_JumpIfInventory("HaloShotgunWasEmpty", 1, "Pump2")
		S0R1 HGFEDCBA 1 A_WeaponReady
		SHTN A 0 A_Takeinventory("Reloading",1)
		Goto Ready
	
	//
	
	 TurboReload:
		SHSS BC 0
	TurboBullets:	
		SHTN A 0
		SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",12,"FinishTurboReload")
        SHTN A 0 A_JumpIfInventory("AmmoShell",1,3)
        Goto FinishTurboReload
        TNT1 AAAA 0
        SHTN A 0 A_Giveinventory("HaloShotgunAmmo",1)
		SHTN A 0 A_Takeinventory("AmmoShell",1)
		Goto TurboBullets
	FinishTurboReload:
		SH0S A 1
		SH0S A 1 A_Refire
		Goto Ready3

      PuristGun:
		TNT1 A 1
		SHTN A 0 A_GiveInventory("ClassicShotgun", 1)
		SHTN A 0 A_TakeInventory("Shot_Gun", 1)
		TNT1 A 10
		Goto Ready2
			
	Unload:
		SH0S A 1
		SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_Takeinventory("Unloading",1)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		SHTN A 0 A_Takeinventory("Zoomed",1)
		SHTN A 0 A_GiveInventory("HaloShotgunWasEmpty", 1)
        SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",1,3)
        Goto OkToFire
        TNT1 AAA 0
		SHTN A 0 A_Takeinventory("Zoomed",1)
		SHTN A 0 A_GiveInventory ("Pumping", 1)
		SHTN A 0 A_Takeinventory("Unloading",1)
		S0R1 ABCDEFGH 1 
		
		
	RemoveBullets:
		TNT1 AAAA 0
		SHTN A 0 A_JumpIfInventory("HaloShotgunAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		SHTN A 0 A_Takeinventory("HaloShotgunAmmo",1)
		SHTN A 0 A_Giveinventory("AmmoShell",1)
		
	   S0R3 B 0 A_PlaySound("HaloPump2", 3)
	   S0R3 ABCDEEEEFGHI 1
	   SHTN A 0 A_Giveinventory("HaloShotgunWasEmpty",1)
		Goto RemoveBullets
	
	FInishUnload:
		S0R3 JKLMNOP 1 
		SHTN A 0 A_Takeinventory("Unloading",1)
		Goto Ready	
		
		
	DoKickReloading:
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
        SHTN A 0 A_PlaySound("KICK")
		SHTN A 0 SetPlayerProperty(0,1,0)
		SHTN A 0 A_GunFlash("KickingFlashReloading")
		KICK BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        KICK H 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK I 1
		KICK GFEDCBA 1 
		RIBA A 0 A_Takeinventory("Kicking",1)
		SHTN A 0 SetPlayerProperty(0,0,0)
		SHTN A 0 A_GunFlash
		Goto InsertingShells
		
	Steady:
		TNT1 A 1
		Goto Ready
		
		

	NoAmmo:
		RIFG A 0
		RIFG A 0 A_ZoomFactor(1.0)
		RIFG A 0 A_Takeinventory("Zoomed",1)
		RIFG A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		TNT1 A 0 A_PlaySound("weapons/empty", 4)
	NoAmmo2:
		RIFG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    RIFG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		RIFG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		RIFG A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		RIFG A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		RIFG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		SH0S A 3 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOPRIMARY)
		RIFG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		RIFG A 0 A_JumpIfInventory("TurboReload",1,"TurboReload")
		TNT1 A 0 A_JumpIfInventory("NoAutoReload", 1, "NoAmmo2")
		RIFG A 0 A_JumpIfInventory("AmmoShell",1,"Reload")
		RIFG A 0 A_JumpIfInventory("FiredPrimary",1,"NoAmmo2")
		Goto Ready3
			
	}
}

ACTOR HaloShotgunAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 13
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 13
   Inventory.Icon "SH0SG0"
}

ACTOR HaloShotgunWasEmpty : Inventory
{
   Inventory.Amount 0
   Inventory.MaxAmount 1
}