actor "Desert Eagle" : RGUWeapon
{
  obituary "%k mutilated %o with the Desert Eagle."
  inventory.pickupmessage "Desert Eagle"  
  //attacksound "deagle/fire"
  weapon.selectionorder 19
  weapon.ammotype "DeagleClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "DeagleAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    DEGA A 2 //A_PlayWeaponSound("m9/select")
    DEGA BCDEFGHIJKL 1 A_WeaponReady(WRF_NOPRIMARY)
    DEGA L 0 A_JumpIfNoAmmo("Reload")
    DEGA L 0 A_JumpIfInventory("Aiming",1,5)
    DEGA L 0 A_JumpIfInventory("Reloading",1,"Reload")
    DEGA L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    DEGA L 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGA L 1 A_WeaponReady
    goto Ready+12
    DEGC F 0 A_JumpIfInventory("Reloading",1,"Reload")    
    DEGC F 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    DEGC F 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGC F 1 A_WeaponReady(WRF_NOBOB)
    goto Ready+18
  Deselect:
    DEGA L 0 A_TakeInventory("Aiming",1)
    DEGA A 0 ACS_ExecuteAlways(602,0,0,0,0)
    DEGA L 0 A_TakeInventory("Reloading",1)
    DEGA L 0 A_ZoomFactor(1.0)
    DEGA L 0 A_Lower
    DEGA L 1 A_Lower
    goto Deselect+2
  Select:
    DEGA A 0 A_Raise
	DEGA A 0 ACS_ExecuteAlways(602,0,0,0,0)
	TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    loop
  Fire:	
    DEGA A 0 A_JumpIfInventory("Aiming",1,"FireAim")
    DEGA L 1 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    DEGB A 0 A_JumpIfInventory("Firing",1,"FireHold")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (15.0, 15.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FireEmpty:
    DEGB B 1 BRIGHT A_GunFlash
    DEGB C 1 BRIGHT A_PlaySound("m9/lock")
    DEGB DEFGH 1
    DEGB I 1 A_GiveInventory("DeagleBolt",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FireHold:
    DEGB A 0 A_JumpIfNoAmmo("Reload")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (30.0, 30.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  Hold:
    DEGA L 3 A_JumpIfInventory("Aiming",1,"HoldAim")
    DEGA L 1 A_ReFire
    goto Ready+12
  HoldAim:
    DEGC F 3
    DEGC F 1 A_ReFire
    goto Ready+18
  FireAim:
    DEGC F 1 A_JumpIfNoAmmo("ReloadStart")
    DEGD F 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGD F 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,8)
    DEGD A 1 BRIGHT A_FireBullets (3.0, 3.0, -1, 26, "HHBulletPuff", 1, 4000)
    DEGD A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    DEGD A 0 A_JumpIfNoAmmo("FireAimEmpty")
    DEGD B 1 BRIGHT A_GunFlash
    DEGD CD 1 A_WeaponReady
    DEGD EFGHI 1 A_WeaponReady
    DEGD A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGD A 0 A_ReFire
    goto Ready+18
    DEGD A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGD A 0 A_ReFire
    goto Ready+18
  FireAimEmpty:
    DEGD B 1 BRIGHT A_GunFlash
    DEGD C 1 BRIGHT A_PlaySound("m9/lock")
    DEGD DEFGH 1
    DEGD I 1 A_GiveInventory("DeagleBolt",1)
    DEGD A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGD A 0 A_ReFire
    goto Ready+18
    DEGD A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGD A 0 A_ReFire
    goto Ready+18
  Reload: //AltFire:
    DEGE A 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadStart")
    DEGE A 0 A_TakeInventory("Reloading",1)
    goto Ready+15
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    DEGE A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    DEGE A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    DEGE A 3 A_JumpIfInventory("DeagleBolt",1,"ReloadStartBolt")
    DEGE BCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE E 3 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGE FGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    DEGE LMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE Q 3 A_TakeInventory("Reloading",1)
    DEGE R 3 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo
  ReloadAmmo:
    DEGE P 0 A_GiveInventory("DeagleClip",1)
    DEGE P 0 A_TakeInventory("DeagleAmmo",1)
    DEGE P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEnd")
    DEGE P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    DEGE STUVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  ReloadStartBolt:
    DEGF ABCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF E 3 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGF FGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    DEGF LMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF Q 3 A_TakeInventory("Reloading",1)
    DEGF R 3 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmoBolt
  ReloadAmmoBolt:
    DEGF P 0 A_GiveInventory("DeagleClip",1)
    DEGF P 0 A_TakeInventory("DeagleAmmo",1)
    DEGF P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEndBolt")
    DEGF P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmoBolt")
    goto ReloadEndBolt
  ReloadEndBolt:
    DEGF S 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF T 3 A_PlaySoundEx("deagle/bolt","SoundSlot5")
    DEGF T 0 A_TakeInventory("DeagleBolt",1)
    DEGE TUVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF G 0 A_ReFire
    goto Ready+12
  AltFire:
    DEGC A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    DEGC A 0 A_ZoomFactor(1.2)
    DEGC ABCDEF 1
    DEGC G 0 A_GiveInventory("Aiming",1)
    DEGC G 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+18
  AltFire2:
    DEGC F 1 A_ZoomFactor(1.0)
    DEGC FEDCBA 1
    DEGC A 0 A_TakeInventory("Aiming",1)
    DEGC A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+12
  ReloadStartAim:
    DEGC F 1 A_ZoomFactor(1.0)
    DEGC FEDCBA 1
    DEGC A 0 A_TakeInventory("Aiming",1)
    DEGC A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEP2 D 15
    WEP2 A 0 A_SpawnItem("DeaglePickup")
    stop
  ReloadStart_SOH:
    DEGE A 2 A_JumpIfInventory("DeagleBolt",1,"ReloadStartBolt_SOH")
    DEGE BCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE E 2 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGE FGHIJK 2 A_WeaponReady(WRF_NOFIRE)
    DEGE LMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE Q 2 A_TakeInventory("Reloading",1)
    DEGE R 2 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    DEGE P 0 A_GiveInventory("DeagleClip",1)
    DEGE P 0 A_TakeInventory("DeagleAmmo",1)
    DEGE P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEnd_SOH")
    DEGE P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    DEGE STUVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  ReloadStartBolt_SOH:
    DEGF ABCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF E 2 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGF FGHIJK 2 A_WeaponReady(WRF_NOFIRE)
    DEGF LMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF Q 2 A_TakeInventory("Reloading",1)
    DEGF R 2 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmoBolt_SOH
  ReloadAmmoBolt_SOH:
    DEGF P 0 A_GiveInventory("DeagleClip",1)
    DEGF P 0 A_TakeInventory("DeagleAmmo",1)
    DEGF P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEndBolt_SOH")
    DEGF P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmoBolt_SOH")
    goto ReloadEndBolt_SOH
  ReloadEndBolt_SOH:
    DEGF S 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF T 2 A_PlaySoundEx("deagle/bolt","SoundSlot5")
    DEGF T 0 A_TakeInventory("DeagleBolt",1)
    DEGE TUVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF G 0 A_ReFire
    goto Ready+12
  Fire_SteadyAim:
    DEGB A 0 A_JumpIfInventory("Firing",1,"FireHold_SteadyAim")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (10.0, 10.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FireHold_SteadyAim:
    DEGB A 0 A_JumpIfNoAmmo("Reload")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (20.0, 20.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FragGrenade:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA A 2 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 2
    TNT1 A 15 
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 2 
    goto Ready+1
  FragGrenade_SOH:
    GRNA A 1 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 1 
    goto Ready+1
  KnifeAttack:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH:
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  }
}

actor DeagleBolt : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor DeagleClip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 7
    ammo.backpackamount 0
    ammo.backpackmaxamount 7
    +IGNORESKILL
}
actor "Deagle Special" : "Desert Eagle"
{
  obituary "%k mutilated %o with the Desert Eagle."
  inventory.pickupmessage "Desert Eagle"  
  //attacksound "deagle/fire"
  weapon.selectionorder 19
  weapon.ammotype "DeagleClip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "DeagleAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Fire:	
    DEGA A 0 A_JumpIfInventory("Aiming",1,"FireAim")
    DEGA L 1 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    DEGB A 0 A_JumpIfInventory("Firing",1,"FireHold")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (15.0, 15.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FireEmpty:
    DEGB B 1 BRIGHT A_GunFlash
    DEGB C 1 BRIGHT A_PlaySound("m9/lock")
    DEGB DEFGH 1
    DEGB I 1 A_GiveInventory("DeagleBolt",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FireHold:
    DEGB A 0 A_JumpIfNoAmmo("Reload")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (30.0, 30.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FireAim:
    DEGC F 1 A_JumpIfNoAmmo("ReloadStart")
    DEGD F 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGD F 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,8)
    DEGD A 1 BRIGHT A_FireBullets (3, 3, -1, 26, "HHBulletPuff", 1, 4000)
    DEGD A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    DEGD A 0 A_JumpIfNoAmmo("FireAimEmpty")
    DEGD B 1 BRIGHT A_GunFlash
    DEGD CD 1 A_WeaponReady
    DEGD EFGHI 1 A_WeaponReady
    DEGD A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGD A 0 A_ReFire
    goto Ready+18
    DEGD A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGD A 0 A_ReFire
    goto Ready+18
  FireAimEmpty:
    DEGD B 1 BRIGHT A_GunFlash
    DEGD C 1 BRIGHT A_PlaySound("m9/lock")
    DEGD DEFGH 1
    DEGD I 1 A_GiveInventory("DeagleBolt",1)
    DEGD A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGD A 0 A_ReFire
    goto Ready+18
    DEGD A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGD A 0 A_ReFire
    goto Ready+18
  Reload: //AltFire:
    DEGE A 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadStart")
    DEGE A 0 A_TakeInventory("Reloading",1)
    goto Ready+15
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    DEGE A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    DEGE A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    DEGE A 3 A_JumpIfInventory("DeagleBolt",1,"ReloadStartBolt")
    DEGE BCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE E 3 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGE FGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    DEGE LMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE Q 3 A_TakeInventory("Reloading",1)
    DEGE R 3 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo
  ReloadAmmo:
    DEGE P 0 A_GiveInventory("DeagleClip2",1)
    DEGE P 0 A_TakeInventory("DeagleAmmo",1)
    DEGE P 0 A_JumpIfInventory("DeagleClip2",14,"ReloadEnd")
    DEGE P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    DEGE STUVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  ReloadStartBolt:
    DEGF ABCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF E 3 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGF FGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    DEGF LMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF Q 3 A_TakeInventory("Reloading",1)
    DEGF R 3 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmoBolt
  ReloadAmmoBolt:
    DEGF P 0 A_GiveInventory("DeagleClip2",1)
    DEGF P 0 A_TakeInventory("DeagleAmmo",1)
    DEGF P 0 A_JumpIfInventory("DeagleClip2",14,"ReloadEndBolt")
    DEGF P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmoBolt")
    goto ReloadEndBolt
  ReloadEndBolt:
    DEGF S 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF T 3 A_PlaySoundEx("deagle/bolt","SoundSlot5")
    DEGF T 0 A_TakeInventory("DeagleBolt",1)
    DEGE TUVW 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF G 0 A_ReFire
    goto Ready+12
  ReloadStart_SOH:
    DEGE A 2 A_JumpIfInventory("DeagleBolt",1,"ReloadStartBolt_SOH")
    DEGE BCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE E 2 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGE FGHIJK 2 A_WeaponReady(WRF_NOFIRE)
    DEGE LMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE Q 2 A_TakeInventory("Reloading",1)
    DEGE R 2 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    DEGE P 0 A_GiveInventory("DeagleClip2",1)
    DEGE P 0 A_TakeInventory("DeagleAmmo",1)
    DEGE P 0 A_JumpIfInventory("DeagleClip2",14,"ReloadEnd_SOH")
    DEGE P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    DEGE STUVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  ReloadStartBolt_SOH:
    DEGF ABCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF E 2 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGF FGHIJK 2 A_WeaponReady(WRF_NOFIRE)
    DEGF LMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF Q 2 A_TakeInventory("Reloading",1)
    DEGF R 2 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmoBolt_SOH
  ReloadAmmoBolt_SOH:
    DEGF P 0 A_GiveInventory("DeagleClip2",1)
    DEGF P 0 A_TakeInventory("DeagleAmmo",1)
    DEGF P 0 A_JumpIfInventory("DeagleClip2",14,"ReloadEndBolt_SOH")
    DEGF P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmoBolt_SOH")
    goto ReloadEndBolt_SOH
  ReloadEndBolt_SOH:
    DEGF S 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF T 2 A_PlaySoundEx("deagle/bolt","SoundSlot5")
    DEGF T 0 A_TakeInventory("DeagleBolt",1)
    DEGE TUVW 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGF G 0 A_ReFire
    goto Ready+12
  Fire_SteadyAim:
    DEGB A 0 A_JumpIfInventory("Firing",1,"FireHold_SteadyAim")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (10.0, 10.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  FireHold_SteadyAim:
    DEGB A 0 A_JumpIfNoAmmo("Reload")
    DEGB A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGB A 1 BRIGHT A_FireBullets (20.0, 20.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGB B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGB A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGB B 1 BRIGHT A_GunFlash
    DEGB B 0 A_GiveInventory("Firing",1)
    DEGB CD 1 A_WeaponReady
    DEGB E 1 A_WeaponReady
    DEGB FGHI 1 A_WeaponReady
    DEGB A 0 A_TakeInventory("Firing",1)
    DEGB A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGB A 0 A_ReFire
    goto Ready+12
    DEGB A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGB A 0 A_ReFire
    goto Ready+12
  }
}

actor DeagleClip2 : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 14
    ammo.backpackamount 0
    ammo.backpackmaxamount 14
    +IGNORESKILL
}


actor DeagleExMags : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor "Desert Eagle Akimbo" : "Desert Eagle"
{
  obituary "%k mutilated %o with the Desert Eagle."
  inventory.pickupmessage "Desert Eagle"  
  //attacksound "u45/fire6"
  weapon.selectionorder 19
  weapon.ammotype "DeagleClip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "DeagleAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    TNT1 A 2 //A_PlayWeaponSound("m9/select")
    DEGG ABCDEFGHIJK 1 A_WeaponReady(WRF_NOFIRE)
    DEGG I 0 A_JumpIfNoAmmo("Reload")
    DEGG I 0 A_JumpIfInventory("Reloading",1,"Reload")
    DEGG I 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    DEGG I 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGG K 1 A_WeaponReady
    goto Ready+12
  Deselect:
    DEGG L 0 A_TakeInventory("Aiming",1)
    DEGG A 0 ACS_ExecuteAlways(602,0,0,0,0)
    DEGG L 0 A_TakeInventory("Reloading",1)
    DEGG L 0 A_ZoomFactor(1.0)
    DEGG L 0 A_Lower
    DEGG K 1 A_Lower
    goto Deselect+2
  Select:
    DEGG A 0 A_Raise
	DEGG A 0 ACS_ExecuteAlways(602,0,0,0,0)
	TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    loop
  Fire: //Right	
    DEGG K 1 A_JumpIfNoAmmo("ReloadStart")
    DEGI A 0 A_JumpIfInventory("FireSwitch",1,"FireLeft")
    DEGI A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    DEGI A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGI A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,20,0)
    DEGI A 1 BRIGHT A_FireBullets (15.0, 15.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGI B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGI A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGI B 1 BRIGHT A_GunFlash
    DEGI B 0 A_GiveInventory("FireSwitch",1)
    DEGI CDEF 1 A_WeaponReady
    DEGG KK 1 A_WeaponReady
    DEGI A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGI A 0 A_ReFire
    goto Ready+12
    DEGI A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGI A 0 A_ReFire
    goto Ready+12
  FireLeft:
    DEGH A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"FireLeft_SteadyAim")
    DEGH A 0 A_PlaySoundEx("deagle/fire","SoundSlot6")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGH A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,-20,0)
    DEGH A 1 BRIGHT A_FireBullets (15.0, 15.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGH B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGH A 0 A_JumpIfNoAmmo("FireEmptyLeft")
    DEGH B 1 BRIGHT A_GunFlash
    DEGH B 0 A_TakeInventory("FireSwitch",1)
    DEGH CDEF 1 A_WeaponReady
    DEGG KK 1 A_WeaponReady
    DEGH A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGH A 0 A_ReFire
    goto Ready+12
    DEGH A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGH A 0 A_ReFire
    goto Ready+12
  FireEmpty:
    DEGI B 1 BRIGHT A_GunFlash
    DEGI C 1 BRIGHT A_PlaySound("m9/lock")
    DEGI DE 1
    DEGI F 1 A_GiveInventory("DeagleBolt",1)
    DEGI A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGI A 0 A_ReFire
    goto Ready+12
    DEGI A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGI A 0 A_ReFire
    goto Ready+12
  FireEmptyLeft:
    DEGH B 1 BRIGHT A_GunFlash
    DEGH C 1 BRIGHT A_PlaySound("m9/lock")
    DEGH DE 1
    DEGH F 1 A_GiveInventory("DeagleBolt",1)
    DEGH A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGH A 0 A_ReFire
    goto Ready+12
    DEGH A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGH A 0 A_ReFire
    goto Ready+12
  AltFire: //Does nothing
    DEGG K 5
    goto Ready+12
  Hold:
    DEGG K 3 
    DEGG K 1 A_ReFire
    goto Ready+12
  Reload: //AltFire:
    DEGG A 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadStart")
    DEGG A 0 A_TakeInventory("Reloading",1)
    goto Ready+15
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    DEGJ A 3 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    DEGJ BCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGJ E 3 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGJ FGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    DEGJ LMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGJ Q 3 A_TakeInventory("Reloading",1)
    DEGJ R 3 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo
  ReloadAmmo:
    DEGJ P 0 A_GiveInventory("DeagleClip2",1)
    DEGJ P 0 A_TakeInventory("DeagleAmmo",1)
    DEGJ P 0 A_JumpIfInventory("DeagleClip2",14,"ReloadEnd")
    DEGJ P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    DEGG A 3 A_JumpIfInventory("DeagleBolt",1,"ReloadEndBolt")
    DEGG BCDEF 3 A_WeaponReady(WRF_NOFIRE)
    DEGG GHIJK 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  ReloadEndBolt:
    DEGJ RR 3 
    DEGJ O 0 A_TakeInventory("DeagleBolt",1)
    DEGG A 3 A_PlayWeaponSound("deagle/bolt")
    DEGG BCDEF 3 A_WeaponReady(WRF_NOFIRE)
    DEGG GHIJK 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  ReloadStart_SOH:
    DEGJ A 2
    DEGJ BCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGJ E 2 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGJ FGHIJK 2 A_WeaponReady(WRF_NOFIRE)
    DEGJ LMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGJ Q 2 A_TakeInventory("Reloading",1)
    DEGJ R 2 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    DEGJ P 0 A_GiveInventory("DeagleClip2",1)
    DEGJ P 0 A_TakeInventory("DeagleAmmo",1)
    DEGJ P 0 A_JumpIfInventory("DeagleClip2",14,"ReloadEnd_SOH")
    DEGJ P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    DEGG A 2 A_JumpIfInventory("DeagleBolt",1,"ReloadEndBolt_SOH")
    DEGG BCDEF 2 A_WeaponReady(WRF_NOFIRE)
    DEGG GHIJK 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  ReloadEndBolt_SOH:
    DEGJ RR 2 
    DEGJ O 0 A_TakeInventory("DeagleBolt",1)
    DEGG A 2 A_PlayWeaponSound("deagle/bolt")
    DEGG BCDEF 2 A_WeaponReady(WRF_NOFIRE)
    DEGG GHIJK 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGE G 0 A_ReFire
    goto Ready+12
  Fire_SteadyAim: //Right
    DEGI A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGI A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,20,0)
    DEGI A 1 BRIGHT A_FireBullets (10.0, 10.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGI B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGI A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGI B 1 BRIGHT A_GunFlash
    DEGI B 0 A_GiveInventory("FireSwitch",1)
    DEGI CDEF 1 A_WeaponReady
    DEGG KK 1 A_WeaponReady
    DEGI A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGI A 0 A_ReFire
    goto Ready+12
    DEGI A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGI A 0 A_ReFire
    goto Ready+12
  FireLeft_SteadyAim:
    DEGH A 0 A_PlaySoundEx("deagle/fire","SoundSlot6")
    DEGH A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,-20,0)
    DEGH A 1 BRIGHT A_FireBullets (10.0, 10.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGH B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGH A 0 A_JumpIfNoAmmo("FireEmptyLeft")
    DEGH B 1 BRIGHT A_GunFlash
    DEGH B 0 A_TakeInventory("FireSwitch",1)
    DEGH CDEF 1 A_WeaponReady
    DEGG KK 1 A_WeaponReady
    DEGH A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGH A 0 A_ReFire
    goto Ready+12
    DEGH A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGH A 0 A_ReFire
    goto Ready+12
  FragGrenade:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA A 2 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 2
    TNT1 A 15 
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 2 
    goto Ready+1
  FragGrenade_SOH:
    GRNA A 1 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 1 
    goto Ready+1
  KnifeAttack:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH:
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  }
}
actor DeagleAkimbo : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor "Desert Eagle Tac Knife" : RGUWeapon
{
  obituary "%k mutilated %o with the Desert Eagle."
  inventory.pickupmessage "Desert Eagle"  
  //attacksound "deagle/fire"
  weapon.selectionorder 19
  weapon.ammotype "DeagleClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "DeagleAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    DEGK A 1 //A_PlayWeaponSound("m9/select")
    DEGK BCDEFGHIJKL 1 A_WeaponReady(WRF_NOPRIMARY)
    DEGK L 0 A_JumpIfNoAmmo("Reload")
    DEGK L 0 A_JumpIfInventory("Aiming",1,5)
    DEGK L 0 A_JumpIfInventory("Reloading",1,"Reload")
    DEGK L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    DEGK L 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGK L 1 A_WeaponReady
    goto Ready+12
    DEGM F 0 A_JumpIfInventory("Reloading",1,"Reload")    
    DEGM F 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    DEGM F 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGM F 1 A_WeaponReady(WRF_NOBOB)
    goto Ready+18
  Deselect:
    DEGK L 0 A_TakeInventory("Aiming",1)
    DEGK A 0 ACS_ExecuteAlways(602,0,0,0,0)
    DEGK L 0 A_TakeInventory("Reloading",1)
    DEGK L 0 A_ZoomFactor(1.0)
    DEGK L 0 A_Lower
    DEGK L 1 A_Lower
    goto Deselect+2
  Select:
    DEGK A 0 A_Raise
	DEGK A 0 ACS_ExecuteAlways(602,0,0,0,0)
	TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    loop
  Fire:	
    DEGK A 0 A_JumpIfInventory("Aiming",1,"FireAim")
    DEGK L 1 A_JumpIfNoAmmo("ReloadStart")
    DEGL A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    DEGL A 0 A_JumpIfInventory("Firing",1,"FireHold")
    DEGL A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGL A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGL A 1 BRIGHT A_FireBullets (15.0, 15.0, 0, 26, "BigPistolPuff", 1, 4000)
    DEGL B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGL A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGL B 1 BRIGHT A_GunFlash
    DEGL B 0 A_GiveInventory("Firing",1)
    DEGL CDEFGH 1 A_WeaponReady
    DEGK L 1 A_WeaponReady
    DEGL A 0 A_TakeInventory("Firing",1)
    DEGL A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGL A 0 A_ReFire
    goto Ready+12
    DEGL A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGL A 0 A_ReFire
    goto Ready+12
  FireEmpty:
    DEGL B 1 BRIGHT A_GunFlash
    DEGL C 1 BRIGHT A_PlaySound("m9/lock")
    DEGL DEFGH 1
    DEGK L 1 A_GiveInventory("DeagleBolt",1)
    DEGL A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGL A 0 A_ReFire
    goto Ready+12
    DEGL A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGL A 0 A_ReFire
    goto Ready+12
  FireHold:
    DEGL A 0 A_JumpIfNoAmmo("Reload")
    DEGL A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGL A 1 BRIGHT A_FireBullets (30.0, 30.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGL B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGL A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGL B 1 BRIGHT A_GunFlash
    DEGL B 0 A_GiveInventory("Firing",1)
    DEGL CDEFGH 1 A_WeaponReady
    DEGK L 1 A_WeaponReady
    DEGL A 0 A_TakeInventory("Firing",1)
    DEGL A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGL A 0 A_ReFire
    goto Ready+12
    DEGL A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGL A 0 A_ReFire
    goto Ready+12
  Hold:
  	TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
  	TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGK L 3 A_JumpIfInventory("Aiming",1,"HoldAim")
    DEGK L 1 A_ReFire
    goto Ready+12
  HoldAim:
    DEGM F 3
    DEGM F 1 A_ReFire
    goto Ready+18
  FireAim:
    DEGM F 1 A_JumpIfNoAmmo("ReloadStart")
    DEGN F 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGN F 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,8)
    DEGN A 1 BRIGHT A_FireBullets (3, 3, -1, 26, "HHBulletPuff", 1, 4000)
    DEGN A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    DEGN A 0 A_JumpIfNoAmmo("FireAimEmpty")
    DEGN B 1 BRIGHT A_GunFlash
    DEGN CDEFGH 1 A_WeaponReady
    DEGM F 1 A_WeaponReady
    DEGN A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGN A 0 A_ReFire
    goto Ready+18
    DEGN A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGN A 0 A_ReFire
    goto Ready+18
  FireAimEmpty:
    DEGN B 1 BRIGHT A_GunFlash
    DEGN C 1 BRIGHT A_PlaySound("m9/lock")
    DEGN DEFGH 1
    DEGM F 1 A_GiveInventory("DeagleBolt",1)
    DEGN A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGN A 0 A_ReFire
    goto Ready+18
    DEGN A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGN A 0 A_ReFire
    goto Ready+18
  Reload: //AltFire:
    DEGO A 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadStart")
    DEGO A 0 A_TakeInventory("Reloading",1)
    goto Ready+15
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    DEGO A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    DEGO A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    DEGO A 3 A_JumpIfInventory("DeagleBolt",1,"ReloadStartBolt")
    DEGO BCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGO E 3 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGO FGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    DEGO LMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGO Q 3 A_TakeInventory("Reloading",1)
    DEGO R 3 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo
  ReloadAmmo:
    DEGO P 0 A_GiveInventory("DeagleClip",1)
    DEGO P 0 A_TakeInventory("DeagleAmmo",1)
    DEGO P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEnd")
    DEGO P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    DEGO STUVWX 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGO G 0 A_ReFire
    goto Ready+12
  ReloadStartBolt:
    DEGP ABCD 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGP E 3 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGP FGHIJK 3 A_WeaponReady(WRF_NOFIRE)
    DEGP LMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGP Q 3 A_TakeInventory("Reloading",1)
    DEGP R 3 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmoBolt
  ReloadAmmoBolt:
    DEGP P 0 A_GiveInventory("DeagleClip",1)
    DEGP P 0 A_TakeInventory("DeagleAmmo",1)
    DEGP P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEndBolt")
    DEGP P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmoBolt")
    goto ReloadEndBolt
  ReloadEndBolt:
    DEGP S 3 A_TakeInventory("DeagleBolt",1)
    DEGP T 3 A_PlaySoundEx("deagle/bolt","SoundSlot5")
    DEGP UVWXY 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGP G 0 A_ReFire
    goto Ready+12
  AltFire:
    DEGM A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    DEGM A 0 A_ZoomFactor(1.2)
    DEGM ABCDEF 1
    DEGM G 0 A_GiveInventory("Aiming",1)
    DEGM G 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+18
  AltFire2:
    DEGM F 1 A_ZoomFactor(1.0)
    DEGM FEDCBA 1
    DEGM A 0 A_TakeInventory("Aiming",1)
    DEGM A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+12
  ReloadStartAim:
    DEGM F 1 A_ZoomFactor(1.0)
    DEGM FEDCBA 1
    DEGM A 0 A_TakeInventory("Aiming",1)
    DEGM A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEP2 D 15
    WEP2 A 0 A_SpawnItem("DeaglePickup")
    stop
  ReloadStart_SOH:
    DEGO A 2 A_JumpIfInventory("DeagleBolt",1,"ReloadStartBolt_SOH")
    DEGO BCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGO E 2 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGO FGHIJK 2 A_WeaponReady(WRF_NOFIRE)
    DEGO LMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGO Q 2 A_TakeInventory("Reloading",1)
    DEGO R 2 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    DEGO P 0 A_GiveInventory("DeagleClip",1)
    DEGO P 0 A_TakeInventory("DeagleAmmo",1)
    DEGO P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEnd_SOH")
    DEGO P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    DEGO STUVWX 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGO G 0 A_ReFire
    goto Ready+12
  ReloadStartBolt_SOH:
    DEGP ABCD 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGP E 2 A_PlaySoundEx("deagle/clipout","SoundSlot5")
    DEGP FGHIJK 2 A_WeaponReady(WRF_NOFIRE)
    DEGP LMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGP Q 2 A_TakeInventory("Reloading",1)
    DEGP R 2 A_PlaySoundEx("deagle/clipin","SoundSlot5")
    goto ReloadAmmoBolt_SOH
  ReloadAmmoBolt_SOH:
    DEGP P 0 A_GiveInventory("DeagleClip",1)
    DEGP P 0 A_TakeInventory("DeagleAmmo",1)
    DEGP P 0 A_JumpIfInventory("DeagleClip",7,"ReloadEndBolt_SOH")
    DEGP P 0 A_JumpIfInventory("DeagleAmmo",1,"ReloadAmmoBolt_SOH")
    goto ReloadEndBolt_SOH
  ReloadEndBolt_SOH:
    DEGP S 2 A_TakeInventory("DeagleBolt",1)
    DEGP T 2 A_PlaySoundEx("deagle/bolt","SoundSlot5")
    DEGP UVWXY 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    DEGP G 0 A_ReFire
    goto Ready+12
  Fire_SteadyAim:
    DEGL A 0 A_JumpIfInventory("Firing",1,"FireHold_SteadyAim")
    DEGL A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGL A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGL A 1 BRIGHT A_FireBullets (10.0, 10.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGL B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGL A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGL B 1 BRIGHT A_GunFlash
    DEGL B 0 A_GiveInventory("Firing",1)
    DEGL CDEFGH 1 A_WeaponReady
    DEGK L 1 A_WeaponReady
    DEGL A 0 A_TakeInventory("Firing",1)
    DEGL A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGL A 0 A_ReFire
    goto Ready+12
    DEGL A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGL A 0 A_ReFire
    goto Ready+12
  FireHold_SteadyAim:
    DEGL A 0 A_JumpIfNoAmmo("Reload")
    DEGL A 0 A_PlayWeaponSound("deagle/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    DEGL A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    DEGL A 1 BRIGHT A_FireBullets (20.0, 20.0, -1, 26, "BigPistolPuff", 1, 4000)
    DEGL B 0 BRIGHT ACS_ExecuteAlways(600,0,120,0,0)
    DEGL A 0 A_JumpIfNoAmmo("FireEmpty")
    DEGL B 1 BRIGHT A_GunFlash
    DEGL B 0 A_GiveInventory("Firing",1)
    DEGL CDEFGH 1 A_WeaponReady
    DEGK L 1 A_WeaponReady
    DEGL A 0 A_TakeInventory("Firing",1)
    DEGL A 0 A_JumpIfInventory("DeagleAmmo",1,2)
    DEGL A 0 A_ReFire
    goto Ready+12
    DEGL A 0 A_JumpIfNoAmmo("ReloadStart")
    DEGL A 0 A_ReFire
    goto Ready+12
  FragGrenade:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA A 2 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 2
    TNT1 A 15 
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 2 
    goto Ready+1
  FragGrenade_SOH:
    GRNA A 1 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 1 
    goto Ready+1
  KnifeAttack:
    DEGQ A 0 A_ZoomFactor(1.0)
    DEGQ A 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    DEGQ A 0 A_TakeInventory("Aiming",1)
    DEGQ A 0 A_TakeInventory("Reloading",1)
    DEGQ A 0 ACS_ExecuteAlways(602,0,0,0,0)
    DEGQ A 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    DEGQ A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    DEGQ A 0 ACS_ExecuteAlways(599,0,0,0,0)
    DEGQ AB 2
    DEGQ C 2 A_PlaySound("knife/swing")
    DEGQ DD 0 A_CustomPunch(34,1,0,"KnifePuff",96)
    DEGQ D 2 A_CustomPunch(34,1,0,"KnifePuff",96)
    DEGQ EF 2
    TNT1 A 10
    DEGQ L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready
  KnifeAttack_Commando:
    DEGQ A 0 ACS_ExecuteAlways(599,0,0,0,0)
    DEGQ AB 2
    DEGQ C 2 A_PlaySound("knife/swing")
    DEGQ DD 0 A_CustomPunch(34,1,0,"KnifePuff",160)
    DEGQ D 2 A_CustomPunch(34,1,0,"KnifePuff",160)
    DEGQ EF 2
    TNT1 A 10
    DEGQ L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready
  KnifeAttack_SOH:
    DEGQ A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    DEGQ A 0 ACS_ExecuteAlways(599,0,0,0,0)
    DEGQ AB 1
    DEGQ C 1 A_PlaySound("knife/swing")
    DEGQ DD 0 A_CustomPunch(28,1,0,"KnifePuff",96)
    DEGQ D 1 A_CustomPunch(28,1,0,"KnifePuff",96)
    DEGQ EF 1
    TNT1 A 5
    DEGQ L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready
  KnifeAttack_SOH_Commando:
    DEGQ A 0 ACS_ExecuteAlways(599,0,0,0,0)
    DEGQ AB 1
    DEGQ C 1 A_PlaySound("knife/swing")
    DEGQ DD 0 A_CustomPunch(28,1,0,"KnifePuff",160)
    DEGQ D 1 A_CustomPunch(28,1,0,"KnifePuff",160)
    DEGQ EF 1
    TNT1 A 5
    DEGQ L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready
  }
}

actor DeagleKnife : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor DeaglePickup : CustomInventory
{
  inventory.pickupmessage "Desert Eagle"  
  inventory.pickupsound "misc/w_pkup"
  +INVENTORY.AUTOACTIVATE
  inventory.respawntics 35
  scale 0.15
  States
  {
  Spawn:
    WEP2 D -1
    stop
  Pickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("Desert Eagle",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    JDGP A 0 A_JumpIfInventory("Deagle Special",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("Desert Eagle Akimbo",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("Desert Eagle Tac Knife",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("MaxWeaponsFilled",0,"FailPickup2")
    BKPK A 0 ACS_ExecuteWithResult(618,30,0,0)
    stop
  AmmoPickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("DeagleAmmo",0,"FailPickup")
    JDGP A 0 A_GiveInventory("DeagleAmmo",7)
    stop
  FailPickup:
    WEP2 D 1
    fail
  FailPickup2:
    WEP2 D 1 
    BKPK A 0 ACS_ExecuteAlways(620,0,2,0,0)
    fail
  }
}
