// =============================================================================
//
// Brutal DOOM - Mutators
//
// 4 is better than 2, then Quad-Shotgun is 
// better than Super Shotgun
//
// -----------------------------
//
// Sprites from Insanity Brutality
// Decorate Scrip by XV117
//
// =============================================================================

ACTOR Quad_Shotgun : BrutalWeapon
{
	Game Doom
	Weapon.SelectionOrder 350
	Weapon.AmmoGive1 0
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "AmmoShell"
	Weapon.AmmoType2 "QuadShotgunAmmo"
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
  	Inventory.Pickupmessage "You picked up the Quad-Barrel Shotgun! (Slot 3)"
  	Obituary "%o got obliterated by %k's Quad-Shotgun"
	tag "Quad Shotgun"
  	Inventory.PickupSound "CLIPINSS"
	+WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	+WEAPON.BFG
	Scale 1.0
	States
	{
	Ready3:
	Ready:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("StartDualWield", 1, "ChangeFireMode")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")	
		TNT1 A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")	
		TNT1 A 0 A_ZoomFactor(1.0)
		QSGG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Loop
		
	Deselect:
		QSGS DCBA 1
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
		TNT1 A 0 A_Takeinventory("StartDualWield",1)
		TNT1 A 0 A_TakeInventory("SlugMode",1)
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Wait
		
	Select:
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("SawSelected",1)
		TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
		TNT1 A 0 A_Giveinventory("SSGSelected",1)
		TNT1 A 0 A_Takeinventory("MinigunSelected",1)
		TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
		TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("BFGSelected",1)
		TNT1 A 0 A_Takeinventory("BFG10kSelected",1)
		TNT1 A 0 A_Takeinventory("RailGunSelected",1)
		TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
		TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
		TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
		TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
		TNT1 A 0 A_Takeinventory("HasBarrel",1) 
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 1 A_Raise
		TNT1 A 0 A_GunFlash
		TNT1 AAAAAAAAAA 0 A_Raise
		Goto SelectAnimation
	SelectAnimation:		
        TNT1 AAAA 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		QSGR U 1 Offset(20,46)
		QSGR V 1 Offset(1,33)        
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_PlaySound("weapons/sshotc",7)
        QSGR WX 1
		QSGR YZ 1
		TNT1 A 0 A_PlaySound("weapons/sshotl",6)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        QHO9 DE 1
		QHO9 FG 1
		Goto Ready
		
    NoAmmo:
        SHTZ A 0
		SHTZ A 0 A_ZoomFactor(1.0)
		SHTZ A 0 A_Takeinventory("Zoomed",1)
		SHTZ A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_PlaySound("weapons/empty", 4)
		NoAmmo2:
		SHTZ A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
	    SHTZ A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SHTZ A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SHTZ A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SHTZ A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")
		SHTZ A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SHTZ A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		QSGG A 5 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOFIRE)
		SHTZ A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("NoAutoReload", 1, "NoAmmo2")
		SHTZ A 0 A_JumpIfInventory("AmmoShell",1,"Reload")
		SHTZ A 0 A_JumpIfInventory("FiredPrimary",1,"NoAmmo2")
		Goto Ready3
		
// Recoil Detection

	QuadRecoil:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)
        QST2 A 0 A_SetPitch(pitch-40)
		TNT1 AA 0
		QST2 A 0 A_SetPitch(pitch-24)
        QST2 B 1 
		QST2 A 0 A_ZoomFactor(1.00)
		QST2 CCCCCC 1 A_SetPitch(pitch+4)
		QSGG A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 11)//Tactical Mode is slower
		QSGG AAAAAAAAAA 1 A_SetPitch(pitch+1.5)
		QSGG A 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
		Goto Reload
		
	TripleRecoil:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)
        QST2 A 0 A_SetPitch(pitch-30)
		TNT1 AA 0
		QST2 A 0 A_SetPitch(pitch-18)
        QST2 B 1 
		QST2 A 0 A_ZoomFactor(1.00)
		QST2 CCCCCC 1 A_SetPitch(pitch+3)
		QSGG A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 11)//Tactical Mode is slower
		QSGG AAAAAAAAAA 1 A_SetPitch(pitch+1)
		QSGG A 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
		Goto Ready
		
	DoubleRecoil:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)
        QST2 A 0 A_SetPitch(pitch-20)
		TNT1 AA 0
		QST2 A 0 A_SetPitch(pitch-12)
        QST2 B 1
		QST2 A 0 A_ZoomFactor(1.00)
		QST2 CCCCCC 1 A_SetPitch(pitch+2)
		QSGG A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 11)//Tactical Mode is slower
		QSGG AAAAAAAAAA 1 A_SetPitch(pitch+0.5)
		QSGG A 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
		Goto Ready
		
	RecoilOne:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)
		TNT1 A 0 A_Setpitch(pitch-10)
		QSGG A 2
		TNT1 A 0 A_Setpitch(-6.0 + pitch)
		TNT1 A 0 A_ZoomFactor(1.0)
		QSGG A 1 A_SetPitch(+1.0 + pitch)
		QSGG AA 1 A_SetPitch(+1.0 + pitch)
		QSGG A 1 A_SetPitch(+3.0 + pitch)
		QSGG A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 7)
		QSGG AAAAAA 1 A_SetPitch(pitch+0.6)
		QSGG A 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
		Goto Ready

// End of Recoil Detection

	 Fire:
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_JumpIfinventory("QSGFireIndicator", 1, "Fire3")
		Goto Fire4
	Fire4:
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 4, 4)
		TNT1 A 0 A_JumpIfinventory("QuadShotgunAmmo", 3, "Fire3")
		TNT1 A 0 A_JumpIfinventory("QuadShotgunAmmo", 2, "Fire2")
		TNT1 A 0 A_JumpIfinventory("QuadShotgunAmmo", 1, "Fire1")
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire4")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 4)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(10)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
		SHO9 A 0 A_firebullets (0,0,2,40,"shotpuff",FBF_NORANDOM,300)
        SHO9 A 0 A_playsound("DSQSGFIR", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		SHTZ A 0 A_FireBullets (10, 2, 18, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_FireBullets (6, 6, 18, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (11, 6, 20, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS1F A 1 BRIGHT
		QS1F B 1 BRIGHT
		Goto QuadRecoil
		
	SlugFire4:
		TNT1 A 0
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 4)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(10)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
        SHO9 A 0 A_playsound("SlugQSG4", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		TNT1 A 0 A_FireBullets (5, 3, 4, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS1F A 1 BRIGHT
		QS1F B 1 BRIGHT
		Goto QuadRecoil
		
	Fire3:
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 3, 3)
		TNT1 A 0 A_JumpIfinventory("QuadShotgunAmmo", 2, "Fire2")
		TNT1 A 0 A_JumpIfinventory("QuadShotgunAmmo", 1, "Fire1")
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire3")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 3)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 3)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(7.5)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
		SHO9 A 0 A_firebullets (0,0,1,40,"shotpuff",FBF_NORANDOM,300)
        SHO9 A 0 A_playsound("SSHFIRE", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		SHTZ A 0 A_FireBullets (10, 2, 13, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_FireBullets (6, 6, 14, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (11, 6, 15, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS2F A 1 BRIGHT
		QS2F B 1 BRIGHT
		Goto TripleRecoil

	SlugFire3:
		TNT1 A 0
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 3)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 3)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(7.5)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
        SHO9 A 0 A_playsound("SlugQSG3", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		TNT1 A 0 A_FireBullets (5, 3, 3, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS2F A 1 BRIGHT
		QS2F B 1 BRIGHT
		Goto TripleRecoil

	AltFire:
	Fire2://Both right barrels
		TNT1 A 0 A_JumpIfinventory("QSGFireIndicator", 1, "Fire1")
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 2, 2)
		TNT1 A 0 A_JumpIfinventory("QuadShotgunAmmo", 1, "Fire1")
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire2")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_JumpIfInventory("QSGFireDummy2", 1, "Fire21")
		TNT1 A 0 A_JumpIfInventory("QSGFireDummy1", 2, "Fire21")
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 2)
		TNT1 A 0 A_GiveInventory("QSGFireDummy2", 1)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(5)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
		SHO9 A 0 A_firebullets (0,0,1,40,"shotpuff",FBF_NORANDOM,300)
        SHO9 A 0 A_playsound("SSHFIRE", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		SHTZ A 0 A_FireBullets (5, 2, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_FireBullets (3, 6, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (5.5, 6, 10, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS3F B 1 BRIGHT
		QS4F A 1 BRIGHT
		Goto DoubleRecoil
		
	SlugFire2:
		TNT1 A 0
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_JumpIfInventory("QSGFireDummy2", 1, "SlugFire21")
		TNT1 A 0 A_JumpIfInventory("QSGFireDummy1", 2, "SlugFire21")
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 2)
		TNT1 A 0 A_GiveInventory("QSGFireDummy2", 1)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(5)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
        SHO9 A 0 A_playsound("SlugSSG", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		TNT1 A 0 A_FireBullets (2.5, 3, 2, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS3F B 1 BRIGHT
		QS4F A 1 BRIGHT
		Goto DoubleRecoil
		
	Fire21://Both left barrels
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 2, 2)
		TNT1 A 0 A_JumpIfinventory("QuadShotgunAmmo", 1, "Fire1")
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire21")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_TakeInventory("QSGFireDummy1", 3)
		TNT1 A 0 A_TakeInventory("QSGFireDummy2", 3)
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 2)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(5)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
		SHO9 A 0 A_firebullets (0,0,1,40,"shotpuff",FBF_NORANDOM,300)
        SHO9 A 0 A_playsound("SSHFIRE", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		SHTZ A 0 A_FireBullets (5, 2, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_FireBullets (3, 6, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTZ A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (5.5, 6, 10, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS3F D 1 BRIGHT
		QS4F B 1 BRIGHT
		Goto DoubleRecoil
		
	SlugFire21:
		TNT1 A 0
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_TakeInventory("QSGFireDummy1", 3)
		TNT1 A 0 A_TakeInventory("QSGFireDummy2", 3)
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 2)
		SHTZ A 0 A_ZoomFactor(1.6)
		SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SHTZ A 0 A_Recoil(5)
		SHTZ A 0
		SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
        SHO9 A 0 A_playsound("SlugSSG", 1)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
		SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",32,0,28)
		TNT1 A 0 A_FireBullets (2.5, 3, 2, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS3F D 1 BRIGHT
		QS4F B 1 BRIGHT
		Goto DoubleRecoil
		
	Fire1://Top right
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 1, 1)
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("QSGFireDummy1", 3, "Fire14")
		TNT1 A 0 A_JumpIfInventory("QSGFireDummy1", 2, "Fire13")
		TNT1 A 0 A_JumpIfInventory("QSGFireDummy1", 1, "Fire12")
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire1")
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("weapons/sg", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 1)
		SHTN A 0 A_FireBullets (5, 3, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTN A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (6, 3, 5, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS3F AB 1 BRIGHT
		Goto RecoilOne
		
	SlugFire1:
		TNT1 A 0 
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("SlugShot", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 1)
		TNT1 A 0 A_FireBullets (2.5, 1.5, -1, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS3F AB 1 BRIGHT
		Goto RecoilOne
		
	Fire12://Bottom right
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 1, 1)
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire12")
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("weapons/sg", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 1)
		SHTN A 0 A_FireBullets (5, 3, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTN A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (6, 3, 5, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS3F AB 1 BRIGHT
		Goto RecoilOne
		
	SlugFire12:
		TNT1 A 0 
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("SlugShot", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 1)
		TNT1 A 0 A_FireBullets (2.5, 1.5, -1, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS3F AB 1 BRIGHT
		Goto RecoilOne
		
	Fire13://Top left
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 1, 1)
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire13")
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("weapons/sg", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 1)
		SHTN A 0 A_FireBullets (5, 3, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTN A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (6, 3, 5, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS3F CD 1 BRIGHT
		Goto RecoilOne
		
	SlugFire13:
		TNT1 A 0 
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("SlugShot", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_GiveInventory("QSGFireDummy1", 1)
		TNT1 A 0 A_FireBullets (2.5, 1.5, -1, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS3F CD 1 BRIGHT
		Goto RecoilOne
		
	Fire14://Bottom left
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 1, 1)
		Goto NoAmmo
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugFire14")
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("weapons/sg", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_TakeInventory("QSGFireDummy1", 3)
		SHTN A 0 A_FireBullets (5, 3, 9, 13, "ShotgunPuff", FBF_NORANDOM)
		SHTN A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 2)//Tactical Mode deals extra damage
		SHTN A 0 A_FireBullets (6, 3, 5, 13, "ShotgunPuff2", FBF_NORANDOM)
		QS3F CD 1 BRIGHT
		Goto RecoilOne
		
	SlugFire14:
		TNT1 A 0
		TNT1 A 0 A_ZoomFactor(0.96)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_playsound("SlugShot", 1)
		TNT1 A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",32,0,28)
		TNT1 AAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
		TNT1 AAAAA 0 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))
		TNT1 A 0 A_TakeInventory("QuadShotgunAmmo", 1)
		TNT1 A 0 A_TakeInventory("QSGFireDummy1", 3)
		TNT1 A 0 A_FireBullets (2.5, 1.5, -1, 120, "ShotPuff", FBF_NORANDOM, 2048)
		QS3F CD 1 BRIGHT
		Goto RecoilOne
	
	ChangeFireMode:
		TNT1 A 0 A_TakeInventory("StartDualWield", 1)
		TNT1 A 0 A_PlaySound("CLIPINSS",1)
		TNT1 A 0 A_JumpIfinventory("QSGFireIndicator", 1, "Use2Barrel")
	Use1Barrel:
		TNT1 A 0
		TNT1 A 0 A_Print("Triple Shot/Single Shot")
		TNT1 A 0 A_Giveinventory("QSGFireIndicator", 1)
		Goto Ready
	Use2Barrel:
		TNT1 A 0
		TNT1 A 0 A_Print("Quad Shot/Double Shot")
		TNT1 A 0 A_Takeinventory("QSGFireIndicator", 1)
		Goto Ready
		
	Reload:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 4, 1)//Check if still has a shell on left barrel
		Goto Reload+4
		TNT1 A 0 A_JumpIfInventory("SlugRoundsUpgrade", 1, "ChangeShell")
		Goto NoUpgrades
		TNT1 A 0 A_JumpIfInventory("AmmoShell", 1, 2)
		Goto Ready
		TNT1 AAAAA 0
		TNT1 A 0 A_TakeInventory("QSGFireDummy1", 3)
		TNT1 A 0 A_TakeInventory("QSGFireDummy2", 3)
		QSGR BCDEF 1
		QSGR GH 1
		QSGR IJ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_PlaySound("weapons/sshotc",4)
		QSGR K 1 //Here comes the extensive edgyness
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 3, "Load1Shells")
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 2, "Load2Shells")
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo", 1, "Load3Shells")
	Load4Shells:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugLoad4Shells")
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 5)
		TNT1 AAAA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10)
		QS4R L 12
		QS4R MMNNOOPP 1
		Goto FillShells
	SlugLoad4Shells:
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 5)
		TNT1 AAAA 0 A_FireCustomMissile("SSGSlugCaseSpawner",0,0,-10)
		QS4R L 12
		QS4R QQRRSSTT 1
		Goto FillShells
		
	Load3Shells:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugLoad3Shells")
		TNT1 AAA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10)
		QS3R L 11
		QS3R MMNNOOPP 1
		Goto FillShells
	SlugLoad3Shells:
		TNT1 AAA 0 A_FireCustomMissile("SSGSlugCaseSpawner",0,0,-10)
		QS3R L 11
		QS3R QQRRSSTT 1
		Goto FillShells
		
	Load2Shells:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugLoad2Shells")
		TNT1 AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10)
		QS2R L 10
		QS2R MMNNOOPP 1
		Goto FillShells
	SlugLoad2Shells:
		TNT1 AA 0 A_FireCustomMissile("SSGSlugCaseSpawner",0,0,-10)
		QS2R L 10
		QS2R QQRRSSTT 1
		Goto FillShells
		
	Load1Shells:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("SlugMode",1,"SlugLoad1Shells")
		TNT1 A 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10)
		QS1R L 9
		QS1R MMNNOOPP 1
		Goto FillShells
	SlugLoad1Shells:
		TNT1 A 0 A_FireCustomMissile("SSGSlugCaseSpawner",0,0,-10)
		QS1R L 9
		QS1R MMQQRRSS 1
		Goto FillShells
		
	FillShells:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo",4,"FinishReload")
		TNT1 A 0 A_JumpIfInventory("AmmoShell",1,3)
		Goto FinishReload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("QuadShotgunAmmo",1)
		TNT1 A 0 A_Takeinventory("AmmoShell",1,TIF_NOTAKEINFINITE)
		Goto FillShells
	
	FinishReload:
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
        TNT1 A 0 A_playsound("weapons/sshotl",5)
		QSGR QQRS 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		QSGR TUV 1
		
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_PlaySound("weapons/sshotc",4)
		
		QSGR WXYZ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		QHO9 DE 1
		QHO9 FG 1
		TNT1 A 0 A_ReFire
		QSGG A 2
        Goto Ready

	ChangeShell:
		TNT1 A 0 A_TakeInventory("StartDualWield", 1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_JumpIfInventory("SlugRoundsUpgrade", 1, "SlugMode")
		Goto NoUpgrades

	NoUpgrades:
		TNT1 A 0 A_Print("You need the Slug Shells Upgrade for Alt-Fire mode.", 2)
		QSGG A 3
		Goto Ready

	SlugMode:
		QSGR BCDEFGHIJ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_PlaySound("weapons/sshotc",4)
		QSGR K 1
		TNT1 A 0 A_JumpIfInventory("SlugMode", 1, "BuckShotMode")
		QS4R L 12
		QS4R QQRRSSTT 1  
		TNT1 A 0 A_GiveInventory("SlugMode", 1)
		TNT1 A 0 A_Print("Slug Shells Loaded", 2)
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
        TNT1 A 0 A_playsound("weapons/sshotl",5)
		QSGR QQRS 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		QSGR TUV 1
		
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_PlaySound("weapons/sshotc",4)
		
		QSGR WXYZ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		QHO9 DE 1
		QHO9 FG 1
		TNT1 A 0 A_ReFire
		QSGG A 2
        Goto Ready
		
	BuckShotMode:
		QS4R L 12
		QS4R MMNNOOPP 1 
		TNT1 A 0 A_TakeInventory("SlugMode", 1)
		TNT1 A 0 A_Print("Buckshot Shells Loaded", 2)
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
        TNT1 A 0 A_playsound("weapons/sshotl",5)
		QSGR QQRS 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		QSGR TUV 1
		
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_PlaySound("weapons/sshotc",4)
		
		QSGR WXYZ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		QHO9 DE 1
		QHO9 FG 1
		TNT1 A 0 A_ReFire
		QSGG A 2
        Goto Ready

	Unload:
		QSGG A 1 A_WeaponReady
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo",1,3)
        Goto Ready
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("QuadShotgunAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("QuadShotgunAmmo",1)
		TNT1 A 0 A_Giveinventory("AmmoShell",1)
		Goto RemoveBullets
	
	FInishUnload:
		QSGR B 2 Offset(30,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
        QSGR B 2 Offset(20,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		QSGR BCDEF 1
		QSGR GH 1
		TNT1 A 0 A_PlaySound("weapons/sshotc")
		QSGR IJ 1
        QSGR K 2
		TNT1 A 20
		TNT1 A 0 A_GiveInventory("HasUnloaded", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		QSGR U 1 Offset(25,46)
		QSGR V 1 Offset(10,33)
        
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_PlaySound("weapons/sshotc")
        QSGR WX 1
		QSGR YZ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        QHO9 DE 1
		QHO9 FG 1
		Goto Ready

	Spawn:
		QGN2 A -1
		Stop
		
// Tactical Sprinting
		
	CheckSprint:
		QSGG A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		TNT1 A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready
		
	StartSprint:
		QSGG A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_JumpIfInventory("UsedStamina", 40, "StopSprintTired")
		
	Sprinting:	
		QSGR I 0 offset(-9,32) 
		TNT1 A 0 offset(-9,32) A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		TNT1 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.
		TNT1 A 0 offset(-9,32) A_JumpIfInventory("PowerStrength", 1, 2)
		TNT1 A 0 offset(-9,32) A_GiveInventory("UsedStamina", 6)
		TNT1 A 0 offset(-9,32)
		QSGR I 1 offset(-9,34) A_SetPitch(pitch -0.5)
		QSGR I 1 offset(-6,36) A_SetPitch(pitch -0.5)
		QSGR I 1 offset(-3,38) A_SetPitch(pitch -0.5)
		QSGR I 1 offset(0,38) A_SetPitch(pitch -0.5)
		QSGR I 1 offset(3,36) A_SetPitch(pitch -0.5)
		QSGR I 1 offset(6,34) A_SetPitch(pitch -0.5)
		QSGR I 1 offset(9,32) A_SetPitch(pitch -0.5)
		TNT1 A 0 offset(9,32) A_WeaponReady(WRF_NOBOB)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 offset(-9,32) A_GiveInventory("UsedStamina", 6)
		TNT1 A 0 offset(9,33) A_SpawnItemEx("FootStep", 0, 0, 2, 0, 0, -4)
		QSGR I 1 offset(9,34) A_SetPitch(pitch +0.5)
		QSGR I 1 offset(6,36) A_SetPitch(pitch +0.5)
		QSGR I 1 offset(3,38) A_SetPitch(pitch +0.5)
		QSGR I 1 offset(0,38) A_SetPitch(pitch +0.5)
		QSGR I 1 offset(-3,36) A_SetPitch(pitch +0.5)
		QSGR I 1 offset(-6,34) A_SetPitch(pitch +0.5)
		QSGR I 1 offset(-9,32) A_SetPitch(pitch +0.5)
		TNT1 A 0 offset(-9,32) A_WeaponReady(WRF_NOBOB)
		TNT1 A 0 offset(-9,32) A_JumpIfInventory("IsRunning", 1, "Sprinting")
		
		Goto StopSprint
	StopSprintTired:
		QSGG A 1
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		TNT1 A 0 A_PlaySound("Tired", 2)
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		QSGG A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		QSGG A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		QSGG A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		QSGG A 5 A_WeaponReady
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		QSGG A 5 A_WeaponReady
		Goto Ready
	StopSprint:
		QSGR I 1
		TNT1 A 0 A_JumpIfInventory("UsedStamina", 60, "StopSprintTired")
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		Goto Ready
		
	}
}
ACTOR QuadShotgunAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 4
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 4
   Inventory.Icon "QGN2A0"
}

Actor QSGFireIndicator : Inventory {inventory.maxamount 1}
Actor QSGFireDummy1 : Inventory {inventory.maxamount 3}
Actor QSGFireDummy2 : Inventory {inventory.maxamount 1}
