// Quad Shotgun
Actor "Quad Shotgun" : AOWWeapon {
    Weapon.BobSpeed 1.75
    Weapon.BobRangeX 0.2
    Weapon.BobRangeY 0.4
    Weapon.BobStyle Alpha
	Inventory.PickupMessage "You got the Quad Shotgun! Awesome!"
	Obituary "$OB_QUAD_SHOTGUN"
	Weapon.SelectionOrder 8	
	DropItem ""
    Weapon.AmmoType "ShotgunAmmo"
	Weapon.AmmoUse 2
	Weapon.AmmoGive 16
   	weapon.kickback 400
	decal BulletChipBig
	Scale 0.5
	Weapon.UpSound "weapons/up/ssg"	
	Weapon.PreferredSkin "Quad_Shotgun_Marine"
	Tag "Quad Shotgun"	
	States {
    Spawn: 
		QSHT A -1
		Stop
    Select:
		PKS3 A 1 offset (90,100)
		PKS3 A 1 offset (80,89)
		PKS3 A 1 offset (70,79)
		PKS3 A 1 offset (60,70)
		PKS3 A 1 offset (50,62)
		PKS3 A 1 offset (40,55)
		PKS3 A 1 offset (30,49)
		PKS3 A 1 offset (20,44)
		PKS3 A 1 offset (15,40)
		PKS3 A 1 offset (10,37)
		PKS3 A 1 offset (5,34)
		PKS3 A 1 offset (0,0)
		TNT1 A 0 A_TakeInventory("SelectAnimation",1)	
		goto ready
	Deselect:
	    TNT1 A 0 A_TakeInventory("ActionFragGrenade",1)	
        TNT1 A 0 A_TakeInventory("ActionFlashbang",1)
        TNT1 A 0 A_TakeInventory("ActionRemoteC4",1)	
        TNT1 A 0 A_TakeInventory("ActionMeleeAttack",1)
		TNT1 A 0 A_TakeInventory("ActionReload",1)	
		PKS3 A 1 offset (4,34)
		PKS3 A 1 offset (8,40)
		PKS3 A 1 offset (16,49)
		PKS3 A 1 offset (24,62)
		PKS3 A 1 offset (32,79)
		PKS3 A 1 offset (40,100)
		TNT1 A 0 offset (1, 33)
		TNT1 A 0 A_Lower
		wait
	Ready:
	    TNT1 A 0 A_JumpIfInventory("SelectAnimation",1,"Select")
		TNT1 A 0 A_JumpIfInventory("ActionFragGrenade",1,"UseFragGrenade")
		TNT1 A 0 A_JumpIfInventory("ActionFlashbang",1,"UseFlashbang")
		TNT1 A 0 A_JumpIfInventory("ActionRemoteC4",1,"UseRemoteC4")
		TNT1 A 0 A_JumpIfInventory("ActionMeleeAttack",1,"UseMeleeAttack")
		TNT1 A 0 A_TakeInventory("ActionReload",1)
		PKS3 A 1 A_WeaponReady 
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory ("IsInSpawnRoom", 1, "Ready")
		TNT1 A 0 A_JumpIfInventory ("InMenu", 1, "Ready")	
		PKS3 A 3
		PKS3 A 0 A_PlaySound("quadshotgun/fire", CHAN_AUTO)	
		PKS3 A 0 Bright A_GunFlash
		PKS3 A 0 Bright Radius_Quake(16, random (12, 24), 0, 1, 0)	
		PKS3 AA 0 Bright A_FireBullets (15.7, 15.7, 26, 5, "HandgunPuff", 1, 750)
        PKS3 BCDEFGHIJKLM 1
		PKS2 A 5 A_CheckReload 
		PKS2 B 2 A_SpawnItemEx("ShotgunShellCasing",8,8,31,random(2,4),random(2,3),random(1,3),156)
		PKS2 C 3 A_SpawnItemEx("ShotgunShellCasing",8,8,31,random(2,4),random(2,3),random(1,3),156)
		PKS2 D 4 A_SpawnItemEx("ShotgunShellCasing",8,8,31,random(2,4),random(2,3),random(1,3),156)
		PKS2 E 4 A_SpawnItemEx("ShotgunShellCasing",8,8,31,random(2,4),random(2,3),random(1,3),156)
		PKS2 F 2 A_PlayWeaponSound("doubleshotgun/open")
		PKS2 GHI 1
		PKS2 J 1 A_PlayWeaponSound("quadshotgun/insert1")
		PKS2 KLMNO 3
		PKS2 P 1 A_PlayWeaponSound("quadshotgun/insert2")
		PKS2 QRST 3
		PKS2 U 1 A_PlayWeaponSound("quadshotgun/insert3")
		PKS2 VWXY 3
		PKS2 Z 1 A_PlayWeaponSound("quadshotgun/insert4")
		PKS1 ABCD 3
		PKS1 E 2 A_CloseShotgun2
		PKS1 F 3
		PKS1 G 2
		PKS1 H 2
		PKS1 I 1 A_Refire
		Goto Ready
	Flash:
		PKS1 J 3 Bright A_Light2
		PKS1 K 2 Bright A_Light1
		Goto LightDone 
	}
}	