/*
CREDITS:

Sprites:
Weapon - ?
Pickup - ID (Doom 64)

Sounds:
Up - People can Fly (Painkiller)
Fire - ID (RTCW)
Rest of sounds - Ubisoft (Will Rock)
*/

ACTOR Gorynch : Weapon 24519
{
   //$Category Weapons
   //$Title Gorynch
   //$Sprite FCKGX0
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You've got the Tungushka Corp. ''Gorynch'' ShVAK-MPSh powercharged-overdrive-superblahblah... etc etc. minigun, nicknamed ''The Fucker''! Things are going to get fucked up... (4)"
   Obituary "%o should not fuck around with %k's ''Gorynch''."
   Weapon.UpSound "Weapons/GorynchUp"
   Weapon.SelectionOrder 5
   Weapon.AmmoType "Boolet"
   Weapon.AmmoGive 100
   Weapon.AmmoUse 1
   Weapon.Kickback 35
   Weapon.SlotNumber 4
   +AMMO_OPTIONAL
   +NOALERT
   States
   {
   Spawn:
      FCKG X -1
      Loop
   Ready:
      FCKG A 0 A_ZoomFactor(1)
      FCKG A 0 A_JumpIfInventory("Spinned",1,"ReadySpinned")
      FCKG A 1 A_WeaponReady
      Loop
   ReadySpinned:
      FCKG A 0 A_PlaySound("Weapons/GorynchLoop",5,0.7,1)
	  FCKG A 0 A_AlertMonsters
      FCKG ABCDABCDABCD 1 A_WeaponReady
      FCKG A 0 A_TakeInventory("Wedel",1)
      FCKG A 0 A_JumpIfInventory("Spinned",1,"ReadySpinned")
      FCKG C 0 A_PlaySound("Weapons/GorynchStop",5,0.7)
      FCKG ABCDABCD 1
      FCKG ABCDA 2
      FCKG BC 2
      FCKG D 4
      Goto Ready
   Deselect:
      FCKG A 0 A_JumpIfInventory("Spinned",1,"DeselectSpinned")
      FCKG A 0 A_ZoomFactor(1)
      FCKG A 0 A_StopSoundEx(5)
      FCKG A 0 A_StopSoundEx(6)
      FCKG A 0 ACS_Execute(711,0,100,0,0)
      FCKG A 1 A_Lower
      FCKG A 0 A_Lower
      Loop
   DeselectSpinned:
      FCKG C 0 A_PlaySound("Weapons/GorynchStop",5,0.7)
      TNT1 A 0 A_TakeInventory("Spinned",1)
      FCKG A 0 ACS_Execute(711,0,100,0,0)
      FCKG ABCDABCD 1
      FCKG ABCDA 2
      FCKG BC 2
      FCKG D 4
      Goto Deselect+1
   Select:
      FCKG A 1 A_Raise
      //FCKG A 0 A_Raise
      FCKG B 1 A_Raise
      FCKG B 0 A_Raise
      FCKG C 1 A_Raise
      //FCKG C 0 A_Raise
      FCKG D 1 A_Raise
      FCKG D 0 A_Raise
      Loop
   Fire:
      FCKG A 0 A_JumpIfInventory("Spinned",1,"Hold")
      FCKG A 0 A_PlaySound("Weapons/GorynchStart",5,0.7)
      FCKG ABCDABCD 3
      FCKG ABCD 2
      FCKG ABCDABCDABCD 1
      FCKG A 0 A_GiveInventory("Spinned",1)
      Goto ReadySpinned
   Hold:
      FCKG A 0 A_JumpIfNoAmmo("HoldNoAmmo")
      goto TrueHold
   TrueHold:
      FCKG A 0 ACS_Execute(711,0,75,0,0)
      FCKG A 0 A_PlaySound("Weapons/GorynchALoop", 5,0.7,1)
      FCKG A 0 A_JumpIfInventory("CaliberUpgrade",1,1)
      Goto Fire1
      FCKG A 0 A_PlaySound("Weapons/WolgirHFire",6,0.8,1)
   Fire1:
      RTGG A 0 A_ZoomFactor(0.84)
      RTGG A 0 A_GiveInventory("Wedel",1)

      FCKG A 0 A_CheckReload
	  FCKG A 0 A_AlertMonsters
      TNT1 A 0 A_GiveInventory("BooletCasing",1)
      FCKG A 0 A_PlaySound("Weapons/GorynchFire",1,0.8)
      FCKG A 0 A_GunFlash
      FCKG A 0 A_Quake(5,4,0,32,"none")
      FCKG A 0 A_Recoil(0.3)
      FCKG A 0 ACS_Execute(851,0,13+random(8,-4),random(7,-7),0)
      FCKG A 0 A_JumpIfInventory("CaliberUpgrade",1,2)
      FCKG A 0 A_FireBullets(4, 2, 8, 12, "BulletPuff", 1)
      Goto Lawdy1 
      FCKG A 0 A_FireBullets(4, 2, 8, 24, "CaliberPuff", 1)
      Goto Lawdy1
   Lawdy1:
      FCKG A 0 A_Jump(255,"Fire1A","Fire1B","Fire1C")
   Fire1A:
      FCK1 A 1 BRIGHT
      Goto Fire2
   Fire1B:
      FCK1 B 1 BRIGHT
      Goto Fire2
   Fire1C:
      FCK1 C 1 BRIGHT
      Goto Fire2
   Fire2:
      FCKG A 0 A_CheckReload
	  FCKG A 0 A_AlertMonsters
      TNT1 A 0 A_GiveInventory("BooletCasing",1)
      FCKG A 0 A_PlaySound("Weapons/GorynchFire",1,0.8)
      FCKG A 0 A_GunFlash
      FCKG A 0 A_Quake(5,4,0,32,"none")
      FCKG A 0 A_Recoil(0.3)
      FCKG A 0 ACS_Execute(851,0,13+random(8,-4),random(7,-7),0)
      FCKG A 0 A_JumpIfInventory("CaliberUpgrade",1,2)
      FCKG A 0 A_FireBullets(4, 2, 8, 12, "BulletPuff", 1)
      Goto Lawdy2
      FCKG A 0 A_FireBullets(4, 2, 8, 24, "CaliberPuff", 1)
      Goto Lawdy2
   Lawdy2:
      FCKG A 0 A_Jump(255,"Fire2A","Fire2B","Fire2C")
   Fire2A:
      FCK2 A 1 BRIGHT
      Goto Fire3
   Fire2B:
      FCK2 B 1 BRIGHT
      Goto Fire3
   Fire2C:
      FCK2 C 1 BRIGHT
      Goto Fire3
   Fire3:
      FCKG A 0 A_CheckReload
	  FCKG A 0 A_AlertMonsters
      TNT1 A 0 A_GiveInventory("BooletCasing",1)
      FCKG A 0 A_PlaySound("Weapons/GorynchFire",1,0.8)
      FCKG A 0 A_GunFlash
      FCKG A 0 A_Quake(5,4,0,32,"none")
      FCKG A 0 A_Recoil(0.3)
      FCKG A 0 ACS_Execute(851,0,13+random(8,-4),random(7,-7),0)
      FCKG A 0 A_JumpIfInventory("CaliberUpgrade",1,2)
      FCKG A 0 A_FireBullets(4, 2, 8, 12, "BulletPuff", 1)
      Goto Lawdy3 
      FCKG A 0 A_FireBullets(4, 2, 8, 24, "CaliberPuff", 1)
      Goto Lawdy3
   Lawdy3:
      FCKG A 0 A_Jump(255,"Fire3A","Fire3B","Fire3C")
   Fire3A:
      FCK3 A 1 BRIGHT
      Goto Fire4
   Fire3B:
      FCK3 B 1 BRIGHT
      Goto Fire4
   Fire3C:
      FCK3 C 1 BRIGHT
      Goto Fire4
   Fire4:
      FCKG A 0 A_CheckReload
	  FCKG A 0 A_AlertMonsters
      TNT1 A 0 A_GiveInventory("BooletCasing",1)
      FCKG A 0 A_PlaySound("Weapons/GorynchFire",1,0.8)
      FCKG A 0 A_GunFlash
      FCKG A 0 A_Quake(5,4,0,32,"none")
      FCKG A 0 A_Recoil(0.3)
      FCKG A 0 ACS_Execute(851,0,13+random(8,-4),random(7,-7),0)
      FCKG A 0 A_JumpIfInventory("CaliberUpgrade",1,2)
      FCKG A 0 A_FireBullets(4, 2, 8, 12, "BulletPuff", 1)
      Goto Lawdy4
      FCKG A 0 A_FireBullets(4, 2, 8, 24, "CaliberPuff", 1)
      Goto Lawdy4
   Lawdy4:
      FCKG A 0 A_Jump(255,"Fire4A","Fire4B","Fire4C")
   Fire4A:
      FCK4 A 1 BRIGHT
      Goto Endler
   Fire4B:
      FCK4 B 1 BRIGHT
      Goto Endler
   Fire4C:
      FCK4 C 1 BRIGHT
      Goto Endler
   Endler:
      FCKG A 0 ACS_Execute(711,0,100,0,0)
      FCKE A 0 A_JumpIfInventory("CaliberUpgrade",1,"CEndler")
      FCKE A 0 A_ZoomFactor(0.855)
      FCKE A 1 A_WeaponReady
      FCKE B 0 A_ZoomFactor(0.86)
      FCKE B 1 A_WeaponReady
      FCKE C 0 A_ZoomFactor(0.875)
      FCKE C 1 A_WeaponReady
      FCKE D 0 A_ZoomFactor(0.89)
      FCKE D 1 A_WeaponReady
      Goto Ready
   CEndler:
      FCKG A 0 A_PlaySound("Weapons/WolgirHEndFire",6,0.8)
      Goto Endler+2
   HoldNoAmmo:
      FCKG A 0 A_JumpIfInventory("Wedel",1,"HoldAStop")
      FCKG A 0 A_PlaySound("Weapons/GorynchLoop",5,0.7,1)
      FCKG ABCDABCDABCD 1
      Goto Ready
   HoldAStop:
      FCKE A 0 A_TakeInventory("Wedel",1)
      FCKE A 0 A_ZoomFactor(0.855)
      FCKE A 1
      FCKE B 0 A_ZoomFactor(0.86)
      FCKE B 1
      FCKE C 0 A_ZoomFactor(0.875)
      FCKE C 1
      FCKE D 0 A_ZoomFactor(0.89)
      FCKE D 1
      FCKE D 0 A_ZoomFactor(1)
      Goto HoldNoAmmo
   AltFire:
      TNT1 A 0 A_JumpIfInventory("Spinned",1,1)
      Goto Ready
      TNT1 A 0 A_TakeInventory("Spinned",1)
      FCKG C 0 A_PlaySound("Weapons/GorynchStop",5,0.7)
      FCKG ABCDABCD 1
      FCKG ABCDA 2
      FCKG BC 2
      FCKG D 4
      Goto Ready
   Flash:
      TNT1 A 1 BRIGHT A_Light1
      TNT1 A 3 BRIGHT A_Light2
      Goto LightDone
   }
}

ACTOR Spinned : Inventory
{
     Inventory.MaxAmount 1
}

ACTOR Wedel : Inventory
{
     Inventory.MaxAmount 1
}
