//Minigun DECORATE

actor TKRWUTMinigun : Weapon
{
  obituary "%k's Minigun turned %o into a leaky piece of meat."
  //attacksound "minigun/fire"
  inventory.pickupmessage "You picked up the Minigun!"
  weapon.kickback 100
  weapon.ammotype "TKRWGuestWeaponAmmo1"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "TKRWGuestWeaponAmmo1"
  weapon.ammouse2 1
  Tag "Minigun (UT)"
  inventory.Icon "TE70B0"
  +CHEATNOTWEAPON
  Weapon.BobStyle Alpha
  Weapon.BobSpeed 2.0
  Weapon.BobRangeX 0.0
  Weapon.BobRangeY 0.3   
  states
  {
  Ready:
    203S ABCDEF 3
    203F A 1 A_WeaponReady
    goto Ready+6
  Deselect:
    203F A 0 A_StopSoundEx("Weapon")
    203F A 0 A_Lower
    203F A 1 A_Lower
    loop
  Select:
    203S A 0 A_PlayWeaponSound("UT/Weapons/minigun/select")
    203S A 0 A_Raise
    goto Select+1
  Fire:
    203B A 0 A_PlaySoundEx("UT/Weapons/minigun/fire", "Weapon", 1)
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B A 3 BRIGHT A_GunFlash
    203A B 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B C 3 BRIGHT A_GunFlash
    203A D 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203F A 0 A_Refire
    203B E 2 A_PlaySoundEx("UT/Weapons/minigun/down", "Weapon")
    203B ABCDEA 2
    203B BCDE 3
    goto Ready+6
  Hold:
    203B A 0 A_PlaySoundEx("UT/Weapons/minigun/fire", "Weapon", 1)
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B E 3 BRIGHT A_GunFlash
    203A A 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B B 3 BRIGHT A_GunFlash
    203A C 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B D 3 BRIGHT A_GunFlash
    203A E 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B A 3 BRIGHT A_GunFlash
    203A B 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B C 3 BRIGHT A_GunFlash
    203A D 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203F A 0 A_Refire
    203B E 2 A_PlaySoundEx("UT/Weapons/minigun/down", "Weapon")
    203B ABCDEA 2
    203B BCDE 3
    goto Ready+6
  AltFire:
    203B A 0 A_PlaySoundEx("UT/Weapons/minigun/fire", "Weapon", 1)
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B A 3 BRIGHT A_GunFlash
    203A B 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown1")
    203B C 3 BRIGHT A_GunFlash
    203A D 2 BRIGHT A_FireBullets (1.0, 1.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203F A 0 A_Refire
    203B E 2 A_PlaySoundEx("UT/Weapons/minigun/down", "Weapon")
    203B ABCDEA 2
    203B BCDE 3
    goto Ready+6
  AltHold:
    203B A 0 A_PlaySoundEx("UT/Weapons/minigun/alt", "Weapon", 1)
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown2")
    203B E 2 BRIGHT A_GunFlash
    203A A 1 BRIGHT A_FireBullets (8.0, 8.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown2")
    203B B 2 BRIGHT A_GunFlash
    203A C 1 BRIGHT A_FireBullets (8.0, 8.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown2")
    203B D 2 BRIGHT A_GunFlash
    203A E 1 BRIGHT A_FireBullets (8.0, 8.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown2")
    203B A 2 BRIGHT A_GunFlash
    203A B 1 BRIGHT A_FireBullets (8.0, 8.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203B A 0 BRIGHT A_JumpIfNoAmmo("SpinDown2")
    203B C 2 BRIGHT A_GunFlash
    203A D 1 BRIGHT A_FireBullets (8.0, 8.0, 1, 8, "BulletPuff",FBF_USEAMMO|FBF_NORANDOM)
	TNT1 A 0 A_SpawnItemEx("ucasing", 33,cos(pitch)*18,sin(-pitch)*25+42, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
    203F A 0 A_Refire
    203B E 1 A_PlaySoundEx("UT/Weapons/minigun/down", "Weapon")
    203B ABCDEABCDE 1
    203B ABCDE 2
    203B ABCDE 3
    goto Ready+6
  SpinDown1:  
    203B E 2 A_PlaySoundEx("UT/Weapons/minigun/down", "Weapon")
    203B ABCDEA 2
    203B BCDE 3
    203F A 0 A_Refire
    goto Ready+6
  SpinDown2:  
    203B E 1 A_PlaySoundEx("UT/Weapons/minigun/down", "Weapon")
    203B ABCDEABCDE 1
    203B ABCDE 2
    203B ABCDE 3
    203F A 0 A_Refire
    goto Ready+6
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 1 bright A_Light2
    TNT1 A 0 bright A_Light0
    stop
Spawn:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("TKRWMinigun",0,0,0,random(1,2),0,5,random(0,360),SXF_NOCHECKPOSITION,0)
    Stop
  }
}
