ACTOR TK2Magnum : Weapon
{
  Weapon.Kickback 100
  scale 0.1
    Weapon.AmmoUse 1
	Weapon.AmmoGive 50
	Weapon.AmmoType "TK2AmmoClip"
  Tag "Magnum Pistol"
  Inventory.PickupMessage "Magnum Pistol"
  Obituary  "%o took a fatal slug from %k."
  	Inventory.PickupSound "Turok2/Items/PickupWeapon"
	Inventory.Icon "TKA5I0"
  States
  {
  Spawn:
    TKQ6 U -1
    Loop
  Ready:
    TK37 A 2 
    TK37 B 1
    TK37 C 2
    TK37 D 1
    TK37 E 2
    TK37 F 1
	TK37 G 2
	TK37 H 1
	TK37 I 2
	TK37 J 1
	TK37 K 2
	TK37 L 1
	TK37 M 2
	TK37 N 1
    TK37 O -1 A_WeaponReady
    Goto Ready+9
  Deselect:
  TK01 A 0 A_JumpIfInventory ("T2AkimboMagnumPistolsOut",1,"DeselectAkimbo")
    TK38 F 2
	TK38 G 1
	TK38 H 2
	TK38 I 1
	TK38 J 2 
	TK38 K 1
	TK38 L 2
	TK38 M 1 
	TK38 N 2
    TK14 Y 0 A_Lower
    wait
  Select: 
    TK37 A 0 A_Raise 
    Loop  
  Fire: 
  TK01 A 0 A_JumpIfInventory ("T2AkimboMagnumPistolsOut",1,"FireAkimbo")
 	TNT1 A 0 A_PlayWeaponSound ("Turok2/Weapons/Mag60Fire")
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TK11 C 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,22,-2,0)
    TK37 P 2 BRIGHT A_FireBullets(2, 2, -1, 9, "BulletPuff")
    TK37 Q 2 
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TK11 C 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,22,-2,0)
    TK37 R 2 BRIGHT A_FireBullets(2, 2, -1, 13, "BulletPuff")
    TK37 S 2 
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TK11 C 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,22,-2,0)
    TK37 T 2 BRIGHT A_FireBullets(2, 2, -1, 16, "BulletPuff")
    TK37 UVX 1
	TK37 YZ 2
	TK38 A 2
	TK38 B 2 A_REFIRE
    TK38 CDE 2 A_REFIRE
    Goto Ready+11
	AltFire:
    TK01 A 0 A_JumpIfInventory ("T2AkimboMagnumPistolCheck",2,"PullOutAnotherMagnumPistol")
	 TNT1 A 0 A_Print("You need Two Magnum Pistols to Akimbo!")
	goto Ready+12
	
	PullOutAnotherMagnumPistol:
	TNT1 A 0 A_JumpIfInventory("T2AkimboMagnumPistolsOut",1,"SwitchBack")
    TK01 A 0 A_Giveinventory ("T2AkimboMagnumPistolsOut",1)
    TK38 F 2
	TK38 G 1
	TK38 H 2
	TK38 I 1
	TK38 J 2 
	TK38 K 1
	TK38 L 2
	TK38 M 1 
	TK38 N 2
    goto readyAkimbo
	
	SwitchBack:
    TK01 A 0 A_TakeInventory ("T2AkimboMagnumPistolsOut",1)
	Tl17 F 2
	Tl17 G 1
	Tl17 H 2
	Tl17 I 1
	Tl17 J 2
	Tl17 K 1
	Tl17 L 2
	TL17 M 1
	TL17 N 2
    goto ready
	
	/// This is where the Akimbo Magnum Pistol code starts there.
	
	  ReadyAkimbo:
    Tl16 A 1 
    Tl16 B 2
    Tl16 C 1
    Tl16 D 2
    Tl16 E 1
    Tl16 F 2
	Tl16 G 1
	Tl16 H 2
	Tl16 I 1
	Tl16 J 2
	Tl16 K 1
	Tl16 L 2
	Tl16 M 1
	Tl16 N 2
    Tl16 O -1 A_WeaponReady
    Goto ReadyAkimbo+7
  DeselectAkimbo:
  TK01 A 0 A_TakeInventory ("T2AkimboMagnumPistolsOut",1)
	Tl17 F 2
	Tl17 G 1
	Tl17 H 2
	Tl17 I 1
	Tl17 J 2
	Tl17 K 1
	Tl17 L 2
	TL17 M 1
	TL17 N 2
    Tl16 Y 0 A_Lower
    wait
  SelectAkimbo: 
    Tl14 A 0 A_Raise 
    Loop  
  FireAkimbo: 
  NULL A 0 A_JumpIfInventory("TK2AmmoClip",6,1)
  goto ReadyAkimbo+11
 	TNT1 A 0 A_PlayWeaponSound ("Turok2/Weapons/Mag60Fire")
	TNT1 A 0 A_PlayWeaponSound ("Turok2/Weapons/Mag60Fire")
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*-12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TK11 C 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,22,-2,0)
	Tl14 R 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,-22,-2,0)
	Tl16 P 0 BRIGHT A_FireBullets(3, 3, -1, 9, "BulletPuff")
    Tl16 P 2 BRIGHT A_FireBullets(3, 3, -1, 9, "BulletPuff")
    Tl16 Q 2 
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*-12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TK11 C 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,22,-2,0)
	Tl14 R 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,-22,-2,0)
	Tl16 R 0 BRIGHT A_FireBullets(3, 3, -1, 13, "BulletPuff")
    Tl16 R 2 BRIGHT A_FireBullets(3, 3, -1, 13, "BulletPuff")
    Tl16 S 2 
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TNT1 A 0 A_SpawnItemEx("TK2PistolCasing", 15,cos(pitch)*-12,sin(-pitch)*10+30, frandom(0.5,1.2),frandom(0.5,1.2),frandom(1.5,2.5))
	TK11 C 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,22,-2,0)
	Tl14 R 0 BRIGHT A_FireCustomMissile("WeaponSmokeSpawn",0,0,-22,-2,0)
	Tl16 T 0 BRIGHT A_FireBullets(3, 3, -1, 16, "BulletPuff")
    Tl16 T 2 BRIGHT A_FireBullets(3, 3, -1, 16, "BulletPuff")
    Tl16 UVX 1
	Tl16 YZ 2
	Tl17 A 2
	Tl17 B 2 A_REFIRE
    Tl17 CDE 2 A_REFIRE
    Goto ReadyAkimbo+11
  }
}

ACTOR TK2MagnumPickup : Custominventory
{
   Scale 0.1
	Inventory.PickupSound "Turok2/Items/Pickup"
    Inventory.PickupMessage "Magnum Pistol"
   States
   {
   Spawn:
	 TKB1 J -1
	  loop
   Pickup:
	  TNT1 A 0 A_GiveInventory("TK2Magnum")
	  TNT1 A 0 A_GiveInventory("T2AkimboMagnumPistolCheck")
	  TNT1 A 0 A_PlaySound ("Turok2/Voice/Mag60")
	  stop
   }
}

ACTOR T2AkimboMagnumPistolCheck : Ammo
{
  +INVENTORY.IGNORESKILL
  Inventory.Amount 0
  Inventory.MaxAmount 2
  Ammo.BackpackAmount 0
  Ammo.BackpackMaxAmount 0
  States
  {
  Spawn:
    TNT1 A 0
    Stop
  }
}

ACTOR T2AkimboMagnumPistolsOut : Ammo
{
  +INVENTORY.IGNORESKILL
  Inventory.Amount 0
  Inventory.MaxAmount 1
  Ammo.BackpackAmount 0
  Ammo.BackpackMaxAmount 0
  States
  {
  Spawn:
    TNT1 A 0
    Stop
  }
}