actor "M1014" : RGUWeapon
{
  obituary "%k smacked %o over with the M1014."
  inventory.pickupmessage "M1014"  
  //attacksound "spas/fire"
  weapon.selectionorder 9
  weapon.ammotype "M1014Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "M1014Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    BM4A A 2 //A_PlayWeaponSound("fal/select")
    BM4A BCDEFGHIJKLMNOO 2 A_WeaponReady(WRF_NOPRIMARY)
    BM4A O 0 A_JumpIfNoAmmo("Reload")
    BM4A O 0 A_JumpIfInventory("Aiming",1,5)
    BM4A O 0 A_JumpIfInventory("Reloading",1,"Reload")
    BM4A O 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    BM4A O 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4A O 1 A_WeaponReady
    goto Ready+16
    BM4C E 0 A_JumpIfInventory("Reloading",1,"Reload")    
    BM4C E 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    BM4C E 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4C E 1 A_WeaponReady(WRF_NOBOB)
    goto Ready+22
  Deselect:
    BM4A O 0 A_TakeInventory("Aiming",1)
    BM4A O 0 ACS_ExecuteAlways(602,0,0,0,0)
    BM4A O 0 A_TakeInventory("Reloading",1)
    BM4A O 0 A_ZoomFactor(1.0)
    BM4A O 0 A_Lower
    BM4A O 1 A_Lower
    goto Deselect+2
  Select:
    BM4A A 0 A_Raise
	BM4A A 0 ACS_ExecuteAlways(602,0,0,0,0)
	TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    loop
  Fire:	
    BM4A O 0 A_JumpIfInventory("Reloading",1,"ReloadEnd")
    BM4A O 0 A_JumpIfInventory("Aiming",1,"FireAim")
    BM4A O 1 A_JumpIfNoAmmo("ReloadStart")
    BM4B B 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    BM4B A 0 A_PlayWeaponSound("m1014/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    BM4B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,8,3)
    BM4B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    BM4B G 0 BRIGHT A_FireBullets (6.0, 6.0, 5, 5, "ShotgunPuff", 0, 200)
    BM4B G 1 BRIGHT A_FireBullets (6.0, 6.0, 8, 7, "ShotgunPuff", 1, 500)
	BM4B G 1 BRIGHT A_FireBullets (6.0, 6.0, 2, 2, "ShotgunPuff", 0, 700)
    BM4B A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    BM4B A 0 A_JumpIfNoAmmo("FireEmpty")
    BM4B B 1 BRIGHT A_GunFlash
    BM4B CDE 1 A_WeaponReady
    BM4B FGH 1 A_WeaponReady
    BM4B A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4B A 0 A_ReFire
    goto Ready+16
    BM4B A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4B A 0 A_ReFire
    goto Ready+16
  FireAim:
    BM4C E 1 A_JumpIfNoAmmo("ReloadStart")
    BM4D A 0 A_PlayWeaponSound("m1014/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    BM4D AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,3)
    BM4D A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,3)
    BM4D G 0 BRIGHT A_FireBullets (5.0, 5.0, 5, 5, "ShotgunPuff", 0, 200)
    BM4D G 1 BRIGHT A_FireBullets (5.0, 5.0, 8, 7, "ShotgunPuff", 1, 500)
	BM4D G 1 BRIGHT A_FireBullets (5.0, 5.0, 2, 2, "ShotgunPuff", 0, 700)
    BM4D A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    BM4D A 0 A_JumpIfNoAmmo("FireAimEmpty")
    BM4D B 1 BRIGHT A_GunFlash
    BM4D CDE 1 A_WeaponReady
    BM4D FGH 1 A_WeaponReady
    BM4D A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4D A 0 A_ReFire
    goto Ready+22
    BM4D A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4D A 0 A_ReFire
    goto Ready+22
  FireEmpty:
    BM4B BC 1 BRIGHT A_GunFlash
    BM4B DE 1 
    BM4B FGH 1 
    BM4B A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4B A 0 A_ReFire
    goto Ready+16
    BM4B A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4B A 0 A_ReFire
    goto Ready+16
  FireAimEmpty:
    BM4D BC 1 BRIGHT A_GunFlash
    BM4D DE 1 
    BM4D FGH 1 
    BM4D A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4D A 0 A_ReFire
    goto Ready+16
    BM4D A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4D A 0 A_ReFire
    goto Ready+16
  Hold:
    BM4A O 3 A_JumpIfInventory("Aiming",1,"HoldAim")
    BM4A O 1 A_ReFire
    goto Ready+16
  HoldAim:
    BM4C E 3
    BM4C E 1 A_ReFire
    goto Ready+22
  Reload: //AltFire:
    BM4A A 0 A_JumpIfInventory("M1014Ammo",1,"ReloadStart")
    BM4A A 0 A_TakeInventory("Reloading",1)
    goto Ready+19
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    BM4E A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    BM4E A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    BM4E A 0 A_GiveInventory("Reloading",1)
    BM4E A 3 
    BM4E BCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    goto ReloadAmmo
  ReloadAmmo:
    BM4E X 0 A_GiveInventory("M1014Clip",1)
    BM4E X 0 A_TakeInventory("M1014Ammo",1)
    BM4E FG 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E H 3 A_PlaySoundEx("m1014/insert","SoundSlot6")
    BM4E IJK 3 A_WeaponReady(WRF_NOBOB)
    BM4E L 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E X 0 A_JumpIfInventory("M1014Clip",4,"ReloadEnd")
    BM4E X 0 A_JumpIfInventory("M1014Ammo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    BM4E M 3 
    BM4E NOPQR 3 A_WeaponReady(WRF_NOFIRE)
    BM4A O 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E B 0 A_TakeInventory("Reloading",1)
    BM4E B 0 A_ReFire
    goto Ready+16
  AltFire:
    BM4C A 0 A_JumpIfInventory("Reloading",1,"ReloadEnd")
    BM4C A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    BM4C A 0 A_ZoomFactor(1.2)
    BM4C ABCDE 1
    BM4C F 0 A_GiveInventory("Aiming",1)
    BM4C F 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+22
  AltFire2:
    BM4C A 0 A_ZoomFactor(1.0)
    BM4C EDCBA 1
    BM4C A 0 A_TakeInventory("Aiming",1)
    BM4C A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+16
  ReloadStartAim:
    BM4C A 0 A_ZoomFactor(1.0)
    BM4C EDCBA 1
    BM4C A 0 A_TakeInventory("Aiming",1)
    BM4C 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 F 15
    TNT1 A 0 A_SpawnItem("M1014Pickup")
    stop
  ReloadStart_SOH:
    BM4E A 0 A_GiveInventory("Reloading",1)
    BM4E A 2
    BM4E BCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    BM4E X 0 A_GiveInventory("M1014Clip",1)
    BM4E X 0 A_TakeInventory("M1014Ammo",1)
    BM4E FG 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E H 2 A_PlaySoundEx("m1014/insert","SoundSlot6")
    BM4E IJK 2 A_WeaponReady(WRF_NOBOB)
    BM4E L 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E X 0 A_JumpIfInventory("M1014Clip",4,"ReloadEnd_SOH")
    BM4E X 0 A_JumpIfInventory("M1014Ammo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    BM4E M 2
    BM4E NOPQR 2 A_WeaponReady(WRF_NOFIRE)
    BM4A O 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E B 0 A_TakeInventory("Reloading",1)
    BM4E B 0 A_ReFire
    goto Ready+16
  Fire_SteadyAim:
    BM4B A 0 A_PlayWeaponSound("m1014/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair",35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    BM4B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,8,3)
    BM4B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    BM4B G 0 BRIGHT A_FireBullets (5.0, 5.0, 5, 5, "ShotgunPuff", 0, 200)
    BM4B G 1 BRIGHT A_FireBullets (5.0, 5.0, 8, 7, "ShotgunPuff", 1, 500)
	BM4B G 1 BRIGHT A_FireBullets (5.0, 5.0, 2, 2, "ShotgunPuff", 0, 700)
    BM4B A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    BM4B A 0 A_JumpIfNoAmmo("FireEmpty")
    BM4B B 1 BRIGHT A_GunFlash
    BM4B CDE 1 A_WeaponReady
    BM4B FGH 1 A_WeaponReady
    BM4B A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4B A 0 A_ReFire
    goto Ready+16
    BM4B A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4B A 0 A_ReFire
    goto Ready+16
  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 M1014Clip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 4
    ammo.backpackamount 0
    ammo.backpackmaxamount 4
    +IGNORESKILL
}
actor "M1014 Ex Mags" : "M1014"
{
  obituary "%k smacked %o over with the M1014."
  inventory.pickupmessage "M1014"  
  //attacksound "spas/fire"
  weapon.selectionorder 9
  weapon.ammotype "M1014Clip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "M1014Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Reload: //AltFire:
    BM4A A 0 A_JumpIfInventory("M1014Ammo",1,"ReloadStart")
    BM4A A 0 A_TakeInventory("Reloading",1)
    goto Ready+19
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    BM4E A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    BM4E A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    BM4E A 0 A_GiveInventory("Reloading",1)
    BM4E A 3 
    BM4E BCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    goto ReloadAmmo
  ReloadAmmo:
    BM4E X 0 A_GiveInventory("M1014Clip2",1)
    BM4E X 0 A_TakeInventory("M1014Ammo",1)
    BM4E FG 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E H 3 A_PlaySoundEx("m1014/insert","SoundSlot6")
    BM4E IJK 3 A_WeaponReady(WRF_NOBOB)
    BM4E L 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E X 0 A_JumpIfInventory("M1014Clip2",6,"ReloadEnd")
    BM4E X 0 A_JumpIfInventory("M1014Ammo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    BM4E M 3 
    BM4E NOPQR 3 A_WeaponReady(WRF_NOFIRE)
    BM4A O 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E B 0 A_TakeInventory("Reloading",1)
    BM4E B 0 A_ReFire
    goto Ready+16
  AltFire:
    BM4C A 0 A_JumpIfInventory("Reloading",1,"ReloadEnd")
    BM4C A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    BM4C A 0 A_ZoomFactor(1.2)
    BM4C ABCDE 1
    BM4C F 0 A_GiveInventory("Aiming",1)
    BM4C F 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+22
  ReloadStartAim:
    BM4C A 0 A_ZoomFactor(1.0)
    BM4C EDCBA 1
    BM4C A 0 A_TakeInventory("Aiming",1)
    BM4C A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  ReloadStart_SOH:
    BM4E A 0 A_GiveInventory("Reloading",1)
    BM4E A 2
    BM4E BCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    BM4E X 0 A_GiveInventory("M1014Clip2",1)
    BM4E X 0 A_TakeInventory("M1014Ammo",1)
    BM4E FG 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E H 2 A_PlaySoundEx("m1014/insert","SoundSlot6")
    BM4E IJK 2 A_WeaponReady(WRF_NOBOB)
    BM4E L 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E X 0 A_JumpIfInventory("M1014Clip2",6,"ReloadEnd_SOH")
    BM4E X 0 A_JumpIfInventory("M1014Ammo",1,"ReloadAmmo_SOH")
    goto ReloadEnd_SOH
  ReloadEnd_SOH:
    BM4E M 2
    BM4E NOPQR 2 A_WeaponReady(WRF_NOFIRE)
    BM4A O 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    BM4E B 0 A_TakeInventory("Reloading",1)
    BM4E B 0 A_ReFire
    goto Ready+16
  }
}
actor M1014Clip2 : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 6
    ammo.backpackamount 0
    ammo.backpackmaxamount 6
    +IGNORESKILL
}
actor M1014ExMags : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor "M1014 Grip" : "M1014"
{
 /* obituary "%k smacked %o over with the M1014."
  inventory.pickupmessage "M1014"  
  //attacksound "spas/fire"
  weapon.selectionorder 9
  weapon.ammotype "M1014Clip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "M1014Ammo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {

  Fire:
    BM4A O 0 A_JumpIfInventory("Reloading",1,"ReloadEnd")
    BM4A O 0 A_JumpIfInventory("Aiming",1,"FireAim")
    BM4A O 1 A_JumpIfNoAmmo("ReloadStart")
    BM4B B 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    BM4B A 0 A_PlayWeaponSound("m1014/fire")
    BM4B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,8,3)
    BM4B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    BM4B A 0 BRIGHT A_FireBullets (6.0, 6.0, 3, 9, "ShotgunPuff", 0, 160)
    BM4B A 1 BRIGHT A_FireBullets (6.0, 6.0, 6, 7, "ShotgunPuff", 1, 1200)
    BM4B A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    BM4B A 0 A_JumpIfNoAmmo("FireEmpty")
    BM4B B 1 BRIGHT A_GunFlash
    BM4B CDE 1 A_WeaponReady
    BM4B FGH 1 A_WeaponReady
    BM4B A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4B A 0 A_ReFire
    goto Ready+16
    BM4B A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4B A 0 A_ReFire
    goto Ready+16
  FireAim:
    BM4C E 1 A_JumpIfNoAmmo("ReloadStart")
    BM4D A 0 A_PlayWeaponSound("m1014/fire")
    BM4D AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,3)
    BM4D A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,3)
    BM4D A 0 BRIGHT A_FireBullets (5.0, 5.0, 3, 9, "ShotgunPuff", 0, 160)
    BM4D A 1 BRIGHT A_FireBullets (5.0, 5.0, 6, 7, "ShotgunPuff", 1, 1200)
    BM4D A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    BM4D A 0 A_JumpIfNoAmmo("FireAimEmpty")
    BM4D B 1 BRIGHT A_GunFlash
    BM4D CDE 1 A_WeaponReady
    BM4D FGH 1 A_WeaponReady
    BM4D A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4D A 0 A_ReFire
    goto Ready+22
    BM4D A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4D A 0 A_ReFire
    goto Ready+22
  Fire_SteadyAim:
    BM4B A 0 A_PlayWeaponSound("m1014/fire")
    BM4B AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,8,3)
    BM4B A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,8,3)
    BM4B A 0 BRIGHT A_FireBullets (5.0, 5.0, 3, 9, "ShotgunPuff", 0, 160)
    BM4B A 1 BRIGHT A_FireBullets (5.0, 5.0, 6, 7, "ShotgunPuff", 1, 1200)
    BM4B A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    BM4B A 0 A_JumpIfNoAmmo("FireEmpty")
    BM4B B 1 BRIGHT A_GunFlash
    BM4B CDE 1 A_WeaponReady
    BM4B FGH 1 A_WeaponReady
    BM4B A 0 A_JumpIfInventory("M1014Ammo",1,2)
    BM4B A 0 A_ReFire
    goto Ready+16
    BM4B A 0 A_JumpIfNoAmmo("ReloadStart")
    BM4B A 0 A_ReFire
    goto Ready+16
  }*/
}
actor M1014Grip : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor M1014Pickup : CustomInventory
{
  inventory.pickupmessage "M1014"  
  inventory.pickupsound "misc/w_pkup"
  +INVENTORY.AUTOACTIVATE
  inventory.respawntics 35
  scale 0.15
  States
  {
  Spawn:
    WEP2 F -1
    stop
  Pickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("M1014",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    JDGP A 0 A_JumpIfInventory("M1014 Ex Mags",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("M1014 Grip",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("MaxWeaponsFilled",0,"FailPickup2")
    BKPK A 0 ACS_ExecuteWithResult(618,32,0,0)
    stop
  AmmoPickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("M1014Ammo",0,"FailPickup")
    JDGP A 0 A_GiveInventory("M1014Ammo",4)
    stop
  FailPickup:
    WEP2 F 1
    fail
  FailPickup2:
    WEP2 F 1 
    BKPK A 0 ACS_ExecuteAlways(620,0,1,0,0)
    fail
  }
}
