actor DoubleShotgun : AliensWeapon replaces SuperShotgun
{
 weapon.ammotype "Shells"
 weapon.selectionorder 1700
 weapon.ammouse 0
 weapon.ammogive 2
 weapon.slotnumber 3
 tag "Sawed-Off Shotgun"
 +weapon.noalert
 +weapon.noautofire
 inventory.pickupmessage "You picked a sawed-off 12 gauge double barreled shotgun!"
 states
 {
  Spawn:
	DBLS P -1
	loop
  Ready:
	TNT1 A 0 A_JumpIfInventory("KickItem", 1, "PreKick")
	TNT1 A 0 A_JumpIfInventory("TrackerToggle", 1, "PreTrack")
	DBLS A 1 A_WeaponReady
	loop
  Select:
	DBLS A 0 A_Raise
	DBLS A 1 A_Raise
	loop
  Deselect:
	TNT1 A 0 A_StopSound(1)
	DBLS A 0 A_Lower
	DBLS A 1 A_Lower
	loop
  Fire:
	TNT1 A 0 A_JumpIfInventory("RadarActive", 1, "TrackerLower")
	DBLS A 0 A_JumpIfInventory("Shells",1,1)
	goto Ready
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_PlayWeaponSound("weapons/supershotgunfire")
	DBLS B 1 BRIGHT
	TNT1 A 0 A_Recoil(0.8)
	DBLS C 2 BRIGHT Radius_Quake(12,5,0,1,0)
	TNT1 A 0 A_TakeInventory("Shells", 2)
	TNT1 AAAAA 0 A_FireCustomMissile("GunSpark",1.5+random(-5.5,5.5),0,0,6,0,1.5+random(-2.8,2.8))
	TNT1 AAAAA 0 A_FireCustomMissile("GunSpark2",1.5+random(-5.5,5.5),0,0,6,0,1.5+random(-2.8,2.8))
	TNT1 AAAAAAAAAAAAAAAAAA 0 A_FireCustomMissile("ShotgunPellet", Frandom(-3,3), 0, 0, 0, 0, Frandom(-3,3))
	TNT1 A 0 A_FireBullets(0, 0, 1, 0, "InvisiPuff")
	DBLS A 3  A_SetPitch (pitch-2.4)
	TNT1 A 0 A_SetPitch (pitch-1.4)
	DBLS D 2 A_PlaySound("weapons/supershotgunopen")
	DBLS E 1
	DBLS F 2
	TNT1 A 0 A_FireCustomMissile("SSGShellSpawner", 9, 0, 3, 1)
	DBLS G 14
	DBLS H 3 
	DBLS I 3 A_PlaySound("weapons/supershotguninsert")
	DBLS J 3
	DBLS K 3
	DBLS F 3
	DBLS E 3
	DBLS D 2 A_PlaySound("weapons/supershotgunclose")
	DBLS A 1 
	DBLS A 1 A_Refire
	goto ready
  PreKick:
	DBLS A 1 offset(-8, 40)
	DBLS A 1 offset(-24, 56)
	DBLS A 1 offset(-40, 72)
	DBLS A 1 offset(-50, 88)
	DBLS A 1 offset(-66, 104)
	goto Kick
  PostKick:
    DBLS A 1 offset(-66, 104)
	DBLS A 1 offset(-50, 88)
	DBLS A 1 offset(-40, 72)
	DBLS A 1 offset(-24, 56)
	DBLS A 1 offset(-8, 40)
	goto ready
  PreTrack:
	DBLS A 1 offset(-8, 40)
	DBLS A 1 offset(-24, 56)
	DBLS A 1 offset(-40, 72)
	DBLS A 1 offset(-50, 88)
	DBLS A 1 offset(-66, 104)
	goto TrackRaise
  PostTrack:
	DBLS A 1 offset(-66, 104)
    DBLS A 1 offset(-50, 88)
	DBLS A 1 offset(-40, 72)
	DBLS A 1 offset(-24, 56)
	DBLS A 1 offset(-8, 40)
	goto ready
  }
}