actor "Beretta M93 Raffica" : RGUWeapon
{
  obituary "%k capped %o with the M93 Raffica."
  inventory.pickupmessage "You got the Beretta M93 Raffica automatic pistol."
  //attacksound "u45/fire6"
  weapon.selectionorder 19
  weapon.ammotype "M93RClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "M93RAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    M93A A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    M93A BC 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
	M93A DEFGH 2 A_WeaponReady(WRF_ALLOWZOOM)
	G18A I 0 A_JumpIfInventory("M93RToken",1,"Reload")
    M93A H 0 A_JumpIfNoAmmo("Reload")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    M93A H 0 A_JumpIfInventory("Aiming",1,5)
    M93A H 0 A_JumpIfInventory("Reloading",1,"Reload")
    M93A H 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    M93A H 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93A H 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+12
    M93C E 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    M93C E 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    M93C E 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+18
  Deselect:
    M93A H 0 A_PlaySoundEx("weapon/down","SoundSlot5")
    M93A H 0 A_TakeInventory("Aiming",1)
    M93A H 0 A_TakeInventory("Reloading",1)
    M93A H 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    M93A H 0 A_ZoomFactor(1.0)
    M93A H 0 A_Lower
    M93A H 1 A_Lower
    Goto Deselect+5
  Select:
    M93A A 0 A_Raise
    Loop
  Fire:
    M93A A 0 A_JumpIfInventory("Aiming",1,"FireAim")
    M93A H 1 A_JumpIfNoAmmo("ReloadStart")
    M93B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-6.00,6.00),1,0,4,0,frandom(-6.00,6.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1 BRIGHT A_GunFlash
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-10.00,10.00),1,0,4,0,frandom(-10.00,10.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1 BRIGHT A_GunFlash
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-10.00,10.00),1,0,4,0,frandom(-10.00,10.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1 BRIGHT A_GunFlash
    M93B CD 1
    M93B EF 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    M93B A 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto Ready+12
    M93B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+12
  FireEmpty:
    M93B B 1 BRIGHT A_GunFlash
    M93B C 1 BRIGHT A_PlaySound("m9/lock")
    M93B DEF 1
    M93B F 1 A_GiveInventory("M93RBolt",1)
    M93B A 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto Ready+12
    M93B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+12
  Hold:
    M93A H 2 A_JumpIfInventory("Aiming",1,"HoldAim")
    M93A H 1 A_ReFire
    Goto Ready+12
  HoldAim:
    M93C E 2
    M93C E 1 A_ReFire
    Goto Ready+18
  FireAim:
    M93C E 1 A_JumpIfNoAmmo("ReloadStart")
    M93D A 0 A_PlayWeaponSound("m93r/fire")
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.20,1.20),1,0,4,0,frandom(-1.20,1.20))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D A 0 A_JumpIfNoAmmo("FireAimEmpty")
    M93D B 1 BRIGHT A_GunFlash
    M93D A 0 A_PlayWeaponSound("m93r/fire")
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.60,1.60),1,0,4,0,frandom(-1.60,1.60))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D A 0 A_JumpIfNoAmmo("FireAimEmpty")
    M93D B 1 BRIGHT A_GunFlash
    M93D A 0 A_PlayWeaponSound("m93r/fire")
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.90,1.90),1,0,4,0,frandom(-1.90,1.90))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D A 0 A_JumpIfNoAmmo("FireAimEmpty")
    M93D B 1 BRIGHT A_GunFlash
    M93D CD 1
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    M93D A 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto Ready+18
    M93D A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+18
  FireAimEmpty:
    M93D B 1 BRIGHT A_GunFlash
    M93D C 1 BRIGHT A_PlaySound("m9/lock")
    M93D DE 1
    M93C E 1
    M93C E 1 A_GiveInventory("M93RBolt",1)
    M93D A 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto Ready+18
    M93D A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+18
  Reload: //AltFire:
    M93A H 0 A_JumpIfInventory("M93RClip",20,2)
    M93A H 0 A_JumpIfInventory("M93RAmmo",1,"ReloadStart")
    M93A H 0 A_TakeInventory("Reloading",1)
    M93A H 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+15
  ReloadStart:
    M93E A 0 ACS_NamedExecuteAlways("RefSpeak",0,0,0,0)
    M93E A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    M93E A 0 A_JumpIfInventory("M93RBolt",1,"ReloadStartBolt")
    M93E A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
	M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload2")
    M93E ABCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E F 3 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload2
  Reload2:
    M93E GHIJKLM 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93E N 3 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93E O 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo
  ReloadAmmo:
    M93E O 0 A_JumpIfInventory("M93RClip",20,"ReloadEnd")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93E O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEnd
    M93E O 0 A_GiveInventory("M93RClip",1)
    M93E O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmo
  ReloadEnd:
    M93E PQRS 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E TUV 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+12
  ReloadStartBolt:
    M93F A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStartBolt_SOH")
	M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload3")
    M93F ABCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F F 3 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload3
  Reload3:
    M93F GHIJKLM 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93F N 3 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93F O 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmoBolt
  ReloadAmmoBolt:
    M93F O 0 A_JumpIfInventory("M93RClip",20,"ReloadEndBolt")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93F O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEndBolt
    M93F O 0 A_GiveInventory("M93RClip",1)
    M93F O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmoBolt
  ReloadEndBolt:
    M93F P 0 A_TakeInventory("M93RBolt",1)
    M93F PQR 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F S 3 A_PlaySoundEx("m93r/bolt","SoundSlot5")
    M93F TUVW 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    Goto Ready+12
  Zoom:
  PostReloadAlt:
    G18A I 0 A_JumpIfInventory("M93RToken",1,"Reload")
    M93C E 0 A_ZoomFactor(1.15)
    M93C D 0 A_GiveInventory("Aiming",1)
	M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    M93C ABCDE 1
    Goto AltHold
  ReloadBreak:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	TNT1 A 0 A_ClearReFire
    Goto Reload
  ClearRefire:
    M93C E 1 A_ClearReFire
	Goto AltHold
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("M93RClip",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93D A 0 A_PlayWeaponSound("m93r/fire")
	GRNA L 0 A_TakeInventory("M93RClip",1)
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.20,1.20),1,0,4,0,frandom(-1.20,1.20))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfInventory("M93RClip",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93D B 1 BRIGHT A_GunFlash
    M93D A 0 A_PlayWeaponSound("m93r/fire")
	GRNA L 0 A_TakeInventory("M93RClip",1)
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.60,1.60),1,0,4,0,frandom(-1.60,1.60))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfInventory("M93RClip",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93D B 1 BRIGHT A_GunFlash
    M93D A 0 A_PlayWeaponSound("m93r/fire")
	GRNA L 0 A_TakeInventory("M93RClip",1)
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.90,1.90),1,0,4,0,frandom(-1.90,1.90))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D B 1 BRIGHT A_GunFlash
    M93D D 1
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
	"####" "#" 0 A_JumpIfInventory("M93RClip",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    A12C A 0 A_ClearReFire
    Goto AltHold
  AltHold:
    A12C C 0 A_JumpIfInventory("FireHeld",1,"ClearRefire")
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	A12C C 0 A_JumpIfInventory("FireHeld",1,"FireAimAltHold")
	A12C C 0 A_JumpIfInventory("Reloading",1,"ReloadBreak")
	U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
	A12C F 0 A_Refire("AltHold")
	A12C C 0 A_JumpIfInventory("Aiming",1,"AltFire2")
	Goto Ready+18
  AltFire:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    G18A I 0 A_JumpIfInventory("M93RToken",1,"Reload")
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"AltHold")
    M93C A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    M93C A 0 A_ZoomFactor(1.15)
    M93C AB 1
    M93C B 0 A_GiveInventory("Aiming",1)
    M93C CDE 1
    M93C E 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	A12C F 0 A_Refire("AltHold")
    Goto Ready+18
  AltFire2:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto Ready+12
  AltFire3:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	goto DropWeapon
  ReloadStartAim:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEAP X 0
    WEAP X 0 A_SpawnItem("M93RDrop")
    stop
  Fire_SteadyAim:
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-4.00,4.00),1,0,4,0,frandom(-4.00,4.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1 BRIGHT A_GunFlash
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-8.00,8.00),1,0,4,0,frandom(-8.00,8.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1 BRIGHT A_GunFlash
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-8.00,8.00),1,0,4,0,frandom(-8.00,8.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B B 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1 BRIGHT A_GunFlash
    M93B CD 1
    M93B EF 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
    M93B A 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto Ready+12
    M93B A 0 A_JumpIfNoAmmo("ReloadStart")
    Goto Ready+12
  ReloadStart_SOH:
    M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload4")
    M93E ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E F 2 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload4
  Reload4:
    M93E GHIJKLM 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93E N 2 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93E O 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    M93E O 0 A_JumpIfInventory("M93RClip",20,"ReloadEnd_SOH")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93E O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEnd_SOH
    M93E O 0 A_GiveInventory("M93RClip",1)
    M93E O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    M93E PQRS 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E TUV 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+12
  ReloadStartBolt_SOH:
    M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload5")
    M93F ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F F 2 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload5
  Reload5:
    M93F GHIJKLM 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93F N 2 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93F O 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmoBolt_SOH
  ReloadAmmoBolt_SOH:
    M93F O 0 A_JumpIfInventory("M93RClip",20,"ReloadEndBolt_SOH")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93F O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEndBolt_SOH
    M93F O 0 A_GiveInventory("M93RClip",1)
    M93F O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmoBolt_SOH
  ReloadEndBolt_SOH:
    M93F P 0 A_TakeInventory("M93RBolt",1)
    M93F PQR 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F S 2 A_PlaySoundEx("m93r/bolt","SoundSlot5")
    M93F TUVW 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    Goto Ready+12
  FragGrenade:
    U45F A 0 ACS_NamedExecuteAlways("RefSpeak",0,1,0,0)
    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_NamedExecuteAlways("RefSpeed",0,0,0,0)
	M4CA J 0 A_JumpIfInventory("ThrowingStun",1,"StunGrenade")
	M4CA J 0 A_JumpIfInventory("ThrowingIncd",1,"IncGrenade")
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 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("GrenadeAmmo",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",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  FragGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 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("GrenadeAmmo",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",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    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_NamedExecuteAlways("RefSpeed",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_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",104)
    KNFA DEFGHIJKL 1
    TNT1 A 20
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_Commando:
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",160)
    KNFA DEFGHIJKL 1
    TNT1 A 20
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_SOH:
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",104)
    KNFA DEFGHIJKL 1
    TNT1 A 10
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  KnifeAttack_SOH_Commando:
    KNFA A 0 ACS_NamedExecuteAlways("RefSlash",0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA C 1 A_CustomPunch(102,1,0,"KnifePuff",160)
    KNFA DEFGHIJKL 1
    TNT1 A 10
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  StunGrenade:
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"StunGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 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("StunAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("StunGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  IncGrenade:
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"IncGrenade_SOH")
    GRNA ABC 2
    GRNA D 2 A_PlaySound("grenade/pinpull")
    GRNA EFGH 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("IncdAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("IncGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 2
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  StunGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 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("StunAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("StunGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  IncGrenade_SOH:
    GRNA ABC 1
    GRNA D 1 A_PlaySound("grenade/pinpull")
    GRNA EFGH 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("IncdAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
	GRNA L 0 A_TakeInventory("ThrowingStun",1)
	GRNA L 0 A_TakeInventory("ThrowingIncd",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("IncGrenade",frandom(-2.00,2.00),0,0,16,0,frandom(-1.50,1.50))
    GRNA MN 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+3
  DropWeapon:
    M93A GFEDCBA 2 A_WeaponReady(WRF_NOPRIMARY)
    M93A A 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	M4CC F 0 A_JumpIfInventory("weapondropper",2,"ThrowWeapon")
    KNFA A 0 ACS_NamedExecuteAlways("RefDropW",0,0,0,0)
	GRNA L 0 A_TakeInventory("weapondropper",1)
	M4CB A 0 A_FireCustomMissile("M93RDropped",0,0,7,2)
	stop
  ThrowWeapon:
    GRNA IKMN 1
	KNFA B 0 A_PlaySound("knife/swing")
    KNFA A 0 ACS_NamedExecuteAlways("RefDropW",0,0,0,0)
	GRNA L 0 A_TakeInventory("weapondropper",2)
	M4CB A 0 A_FireCustomMissile("M93RThrown",0,0,7,2)
	stop
  }
}

actor M93RBolt : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor M93RClip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 20
    ammo.backpackamount 0
    ammo.backpackmaxamount 20
    +IGNORESKILL
}
actor "Beretta M93 Raffica Ex Mags" : "Beretta M93 Raffica"
{
  obituary "%k capped %o with the M93 Raffica."
  inventory.pickupmessage "You got the Beretta M93 Raffica automatic pistol."
  //attacksound "u45/fire6"
  weapon.selectionorder 19
  weapon.ammotype "M93RClip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "M93RAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    M93A A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    M93A BC 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
	M93A DEFGH 2 A_WeaponReady(WRF_ALLOWZOOM)
	G18A I 0 A_JumpIfInventory("M93RToken",1,"Reload")
    M93A H 0 A_JumpIfNoAmmo("Reload")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    M93A H 0 A_JumpIfInventory("Aiming",1,5)
    M93A H 0 A_JumpIfInventory("Reloading",1,"Reload")
    M93A H 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    M93A H 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93A H 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+12
    M93C E 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    M93C E 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    M93C E 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+18
  Reload: //AltFire:
    M93A H 0 A_JumpIfInventory("M93RClip2",30,2)
    M93A H 0 A_JumpIfInventory("M93RAmmo",1,"ReloadStart")
    M93A H 0 A_TakeInventory("Reloading",1)
    M93A H 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+15
  ReloadStart:
    M93E A 0 ACS_NamedExecuteAlways("RefSpeak",0,0,0,0)
    M93E A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    M93E A 0 A_JumpIfInventory("M93RBolt",1,"ReloadStartBolt")
    M93E A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
	M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload2")
    M93E ABCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E F 3 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolExtEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload2
  Reload2:
    M93E GHIJKLM 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93E N 3 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93E O 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo
  ReloadAmmo:
    M93E O 0 A_JumpIfInventory("M93RClip2",30,"ReloadEnd")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93E O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEnd
    M93E O 0 A_GiveInventory("M93RClip2",1)
    M93E O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmo
  ReloadEnd:
    M93E PQRS 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E TUV 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+12
  ReloadStartBolt:
    M93F A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStartBolt_SOH")
	M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload3")
    M93F ABCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F F 3 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolExtEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload3
  Reload3:
    M93F GHIJKLM 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93F N 3 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93F O 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmoBolt
  ReloadAmmoBolt:
    M93F O 0 A_JumpIfInventory("M93RClip2",30,"ReloadEndBolt")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93F O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEndBolt
    M93F O 0 A_GiveInventory("M93RClip2",1)
    M93F O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmoBolt
  ReloadEndBolt:
    M93F P 0 A_TakeInventory("M93RBolt",1)
    M93F PQR 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F S 3 A_PlaySoundEx("m93r/bolt","SoundSlot5")
    M93F TUVW 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    Goto Ready+12
  ReloadStartAim:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  ReloadStart_SOH:
    M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload4")
    M93E ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E F 2 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolExtEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload4
  Reload4:
    M93E GHIJKLM 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93E N 2 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93E O 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    M93E O 0 A_JumpIfInventory("M93RClip2",30,"ReloadEnd_SOH")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93E O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEnd_SOH
    M93E O 0 A_GiveInventory("M93RClip2",1)
    M93E O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    M93E PQRS 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E TUV 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+12
  ReloadStartBolt_SOH:
    M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload5")
    M93F ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F F 2 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolExtEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload5
  Reload5:
    M93F GHIJKLM 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93F N 2 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93F O 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmoBolt_SOH
  ReloadAmmoBolt_SOH:
    M93F O 0 A_JumpIfInventory("M93RClip2",30,"ReloadEndBolt_SOH")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93F O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEndBolt_SOH
    M93F O 0 A_GiveInventory("M93RClip2",1)
    M93F O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmoBolt_SOH
  ReloadEndBolt_SOH:
    M93F P 0 A_TakeInventory("M93RBolt",1)
    M93F PQR 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F S 2 A_PlaySoundEx("m93r/bolt","SoundSlot5")
    M93F TUVW 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    Goto Ready+12
  PostReloadAlt:
    G18A I 0 A_JumpIfInventory("M93RToken",1,"Reload")
    M93C E 0 A_ZoomFactor(1.15)
    M93C D 0 A_GiveInventory("Aiming",1)
	M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    M93C ABCDE 1
    Goto AltHold
  ReloadBreak:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	TNT1 A 0 A_ClearReFire
    Goto Reload
  ClearRefire:
    M93C E 1 A_ClearReFire
	Goto AltHold
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("M93RClip2",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93D A 0 A_PlayWeaponSound("m93r/fire")
	GRNA L 0 A_TakeInventory("M93RClip2",1)
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.20,1.20),1,0,4,0,frandom(-1.20,1.20))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfInventory("M93RClip2",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93D B 1 BRIGHT A_GunFlash
    M93D A 0 A_PlayWeaponSound("m93r/fire")
	GRNA L 0 A_TakeInventory("M93RClip2",1)
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.60,1.60),1,0,4,0,frandom(-1.60,1.60))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfInventory("M93RClip2",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93D B 1 BRIGHT A_GunFlash
    M93D A 0 A_PlayWeaponSound("m93r/fire")
	GRNA L 0 A_TakeInventory("M93RClip2",1)
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.90,1.90),1,0,4,0,frandom(-1.90,1.90))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D B 1 BRIGHT A_GunFlash
    M93D D 1
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM)
	"####" "#" 0 A_JumpIfInventory("M93RClip2",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    A12C A 0 A_ClearReFire
    Goto AltHold
  }
}
actor M93RClip2 : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 30
    ammo.backpackamount 0
    ammo.backpackmaxamount 30
    +IGNORESKILL
}
actor M93RExMags : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}

actor "Beretta M93 Raffica Auto" : "Beretta M93 Raffica"
{
  obituary "%k quickly capped %o with the M93 Raffica Auto."
  inventory.pickupmessage "You got the Beretta M93 Raffica automatic pistol."
  //attacksound "u45/fire6"
  weapon.selectionorder 19
  weapon.ammotype "M93RClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "M93RAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  -NOAUTOFIRE
  states
  {
  Fire:
    M93A A 0 A_JumpIfInventory("Aiming",1,"FireAim")
    M93A A 0 A_JumpIfNoAmmo("ReloadStart")
    M93B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 0 BRIGHT A_GunFlash
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-6.00,6.00),1,0,4,0,frandom(-6.00,6.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93B B 0 A_JumpIfInventory("M93RAmmo",1,5)
    M93B CDEF 1 A_ReFire
    Goto Ready+12
    M93B B 0 A_JumpIfNoAmmo("ReloadStart")
    M93B CDEF 1 A_ReFire
    Goto Ready+12
  Hold:
    M93A A 0 A_JumpIfInventory("Aiming",1,"HoldAim")
    M93A A 0 A_JumpIfNoAmmo("ReloadStart")
    M93B A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Hold_SteadyAim")
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 0 BRIGHT A_GunFlash
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-10.00,10.00),1,0,4,0,frandom(-10.00,10.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93B B 0 A_JumpIfInventory("M93RAmmo",1,5)
    M93B CDEF 1 A_ReFire
    Goto Ready+12
    M93B B 0 A_JumpIfNoAmmo("ReloadStart")
    M93B CDEF 1 A_ReFire
    Goto Ready+12
  FireEmpty:
    M93B B 1 A_PlaySound("m9/lock")
    M93B CDEF 1
    M93B F 1 A_GiveInventory("M93RBolt",1)
    M93B F 0 A_JumpIfInventory("M93RAmmo",1,2)
    M93B F 0 A_ReFire
    Goto Ready+12
    M93B F 0 A_JumpIfNoAmmo("ReloadStart")
    M93B F 0 A_ReFire
    Goto Ready+12
  FireAim:
    M93C E 0 A_JumpIfNoAmmo("ReloadStart")
    M93D A 0 A_PlayWeaponSound("m93r/fire")
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 0 BRIGHT A_GunFlash
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-1.20,1.20),1,0,4,0,frandom(-1.20,1.20))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D A 0 A_JumpIfNoAmmo("FireAimEmpty")
    M93D B 1
    M93D B 0 A_JumpIfInventory("M93RAmmo",1,5)
    M93D CDE 1 A_ReFire
    M93C E 1 A_ReFire
    Goto Ready+18
    M93D B 0 A_JumpIfNoAmmo("ReloadStart")
    M93D CDE 1 A_ReFire
    M93C E 1 A_ReFire
    Goto Ready+18
  HoldAim:
    M93C E 0 A_JumpIfNoAmmo("ReloadStart")
    M93D A 0 A_PlayWeaponSound("m93r/fire")
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
    M93D A 0 BRIGHT A_GunFlash
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-3.60,3.60),1,0,4,0,frandom(-3.60,3.60))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D A 0 A_JumpIfNoAmmo("FireAimEmpty")
    M93D B 1
    M93D B 0 A_JumpIfInventory("M93RAmmo",1,5)
    M93D CDE 1 A_ReFire
    M93C E 1 A_ReFire
    Goto Ready+18
    M93D B 0 A_JumpIfNoAmmo("ReloadStart")
    M93D CDE 1 A_ReFire
    M93C E 1 A_ReFire
    Goto Ready+18
  FireAimEmpty:
    M93D B 1 A_PlaySound("m9/lock")
    M93D CDE 1
    M93C E 1 A_GiveInventory("M93RBolt",1)
    M93C E 0 A_JumpIfInventory("M93RAmmo",1,2)
    M93C E 0 A_ReFire
    Goto Ready+18
    M93C E 0 A_JumpIfNoAmmo("ReloadStart")
    M93C E 0 A_ReFire
    Goto Ready+18
  Fire_SteadyAim:
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 0 BRIGHT A_GunFlash
    "####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-4.00,4.00),1,0,4,0,frandom(-4.00,4.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93B B 0 A_JumpIfInventory("M93RAmmo",1,5)
    M93B CDEF 1 A_ReFire
    Goto Ready+12
    M93B B 0 A_JumpIfNoAmmo("ReloadStart")
    M93B CDEF 1 A_ReFire
    Goto Ready+12
  Hold_SteadyAim:
    M93B A 0 A_PlayWeaponSound("m93r/fire")
    M93B A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,7,4)
    M93B A 0 BRIGHT A_GunFlash
    M93B A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-8.00,8.00),1,0,4,0,frandom(-8.00,8.00))
	M93B A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,11,39-(Sin(Pitch)*40),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93B A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93B A 0 A_JumpIfNoAmmo("FireEmpty")
    M93B B 1
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93B B 0 A_JumpIfInventory("M93RAmmo",1,5)
    M93B CDEF 1 A_ReFire
    Goto Ready+12
    M93B B 0 A_JumpIfNoAmmo("ReloadStart")
    M93B CDEF 1 A_ReFire
    Goto Ready+12
  Zoom:
  PostReloadAlt:
    G18A I 0 A_JumpIfInventory("M93RToken",1,"Reload")
    M93C E 0 A_ZoomFactor(1.15)
    M93C D 0 A_GiveInventory("Aiming",1)
	M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    M93C ABCDE 1
    Goto AltHold
  ReloadBreak:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	TNT1 A 0 A_ClearReFire
    Goto Reload
  ClearRefire:
    M93C E 1 A_ClearReFire
	Goto AltHold
  FireAimAltHold:
	"####" "#" 0 A_JumpIfInventory("M93RClip",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93D A 0 A_PlayWeaponSound("m93r/fire")
	GRNA L 0 A_TakeInventory("M93RClip",1)
    M93D A 0 A_FireCustomMissile("WeaponSmokePuff",0,0,0,7)
	"####" # 0 A_FireBullets(0.0, 0.0, 0, 0, "HHTag", FBF_NOFLASH, 4096)
    M93D A 0 BRIGHT A_GunFlash
    M93D A 1 BRIGHT A_FireCustomMissile("HHCBM93R",frandom(-3.60,3.60),1,0,4,0,frandom(-3.60,3.60))
	M93D A 0 A_SpawnItemEx("BulletCasing",Cos(Pitch)*30,0,42-(Sin(Pitch)*28),Cos(Pitch)*FRandom(2,4),FRandom(3,6),-Sin(Pitch)*FRandom(3,6),0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    M93D A 0 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    M93D B 1
    M93D CDE 1 A_ReFire
	"####" "#" 0 A_JumpIfInventory("M93RClip",1,2)
	TNT1 A 0 A_GiveInventory("M93RBolt",1)
	Goto ReloadBreak
    M93C E 1 A_ReFire
    Goto Ready+18
  AltHold:
    M93C E 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	A12C C 0 A_JumpIfInventory("FireHeld",1,"FireAimAltHold")
	A12C C 0 A_JumpIfInventory("Reloading",1,"Reload")
	U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
	A12C F 0 A_Refire("AltHold")
	A12C C 0 A_JumpIfInventory("Aiming",1,"AltFire2")
	Goto Ready+18
  AltFire:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    G18A I 0 A_JumpIfInventory("M93RToken",1,"Reload")
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"AltHold")
    M93C A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    M93C A 0 A_ZoomFactor(1.15)
    M93C AB 1
    M93C B 0 A_GiveInventory("Aiming",1)
    M93C CDE 1
    M93C E 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    M93C E 0 A_ReFire
    Goto Ready+18
  AltFire2:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBAA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    Goto Ready+12
  AltFire3:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    M93C A 0 A_ReFire
	goto DropWeapon
  ReloadStartAim:
    M93C E 0 A_ZoomFactor(1.0)
    M93C ED 1
    M93C D 0 A_TakeInventory("Aiming",1)
    M93C CBA 1
    M93C A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+2
  Reload: //AltFire:
    M93A H 0 A_JumpIfInventory("M93RClip",20,2)
    M93A H 0 A_JumpIfInventory("M93RAmmo",1,"ReloadStart")
    M93A H 0 A_TakeInventory("Reloading",1)
    M93A H 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+15
  ReloadStart:
    M93E A 0 ACS_NamedExecuteAlways("RefSpeak",0,0,0,0)
    M93E A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    M93E A 0 A_JumpIfInventory("M93RBolt",1,"ReloadStartBolt")
    M93E A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
	M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload2")
    M93E ABCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E F 3 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload2
  Reload2:
    M93E GHIJKLM 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93E N 3 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93E O 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo
  ReloadAmmo:
    M93E O 0 A_JumpIfInventory("M93RClip",20,"ReloadEnd")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93E O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEnd
    M93E O 0 A_GiveInventory("M93RClip",1)
    M93E O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmo
  ReloadEnd:
    M93E PQRS 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E TUV 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93E V 0 A_ReFire
    Goto Ready+12
  ReloadStartBolt:
    M93F A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStartBolt_SOH")
	M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload3")
    M93F ABCDE 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F F 3 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload3
  Reload3:
    M93F GHIJKLM 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93F N 3 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93F O 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmoBolt
  ReloadAmmoBolt:
    M93F O 0 A_JumpIfInventory("M93RClip",20,"ReloadEndBolt")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93F O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEndBolt
    M93F O 0 A_GiveInventory("M93RClip",1)
    M93F O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmoBolt
  ReloadEndBolt:
    M93F P 0 A_TakeInventory("M93RBolt",1)
    M93F PQR 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F S 3 A_PlaySoundEx("m93r/bolt","SoundSlot5")
    M93F TUVW 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93F W 0 A_ReFire
    Goto Ready+12
  ReloadStart_SOH:
    M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload4")
    M93E ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E F 2 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload4
  Reload4:
    M93E GHIJKLM 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93E N 2 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93E O 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    M93E O 0 A_JumpIfInventory("M93RClip",20,"ReloadEnd_SOH")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93E O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEnd_SOH
    M93E O 0 A_GiveInventory("M93RClip",1)
    M93E O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    M93E PQRS 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93E TUV 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93E V 0 A_ReFire
    Goto Ready+12
  ReloadStartBolt_SOH:
    M93E A 0 A_JumpIfInventory("M93RToken",1,"Reload5")
    M93F ABCDE 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F F 2 A_PlaySoundEx("m93r/clipout","SoundSlot5")
	M93E F 0 A_FireCustomMissile("PistolEmptyMagSpawner",0,0,0,1)
	M93E E 0 A_GiveInventory("M93RToken",1)
	goto Reload5
  Reload5:
    M93F GHIJKLM 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    M93F N 2 A_PlaySoundEx("m93r/clipin","SoundSlot5")
    M93F O 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmoBolt_SOH
  ReloadAmmoBolt_SOH:
    M93F O 0 A_JumpIfInventory("M93RClip",20,"ReloadEndBolt_SOH")
	M93E E 0 A_TakeInventory("M93RToken",1)
    M93F O 0 A_JumpIfInventory("M93RAmmo",1,1)
    Goto ReloadEndBolt_SOH
    M93F O 0 A_GiveInventory("M93RClip",1)
    M93F O 0 A_TakeInventory("M93RAmmo",1)
    Goto ReloadAmmoBolt_SOH
  ReloadEndBolt_SOH:
    M93F P 0 A_TakeInventory("M93RBolt",1)
    M93F PQR 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    M93F S 2 A_PlaySoundEx("m93r/bolt","SoundSlot5")
    M93F TUVW 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    M93F W 0 A_ReFire
    Goto Ready+12
  }
}

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

actor M93RPickup : CustomInventory
{
  inventory.pickupmessage "You got the Beretta M93 Raffica automatic pistol."
  inventory.pickupsound "deagle/bolt"
  +INVENTORY.AUTOACTIVATE
  //inventory.respawntics 70
  scale 0.14
  States
  {
  Spawn:
    WEAP X -1
    stop
  Pickup:
    WEAP X 0
    WEAP X 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",0,0,0)) == 1, "PickupStay")
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Ex Mags",1,"AmmoPickup")
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Auto",1,"AmmoPickup")
    WEAP X 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP X 0 A_JumpIfInventory("MaxWeaponsFilled",93,"FailPickup2")
	WEAP X 0 A_GiveInventory("MaxWeaponsFilled",8)
    WEAP X 0 ACS_NamedExecuteWithResult("RefPickU",22,0,0)
    stop
  PickupStay:
    WEAP X 0
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Ex Mags",1,"FailPickup")
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Auto",1,"FailPickup")
    WEAP X 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP X 0 A_JumpIfInventory("MaxWeaponsFilled",93,"FailPickup2")
	WEAP X 0 A_GiveInventory("MaxWeaponsFilled",8)
    WEAP X 0 ACS_NamedExecuteWithResult("RefPickU",22,0,0)
    WEAP X 0 ACS_NamedExecuteWithResult("RefPickC",22,0,0)
    WEAP X 0 A_PlaySound("deagle/bolt")
    fail
  AmmoPickup:
    WEAP X 0
    WEAP X 0 A_JumpIfInventory("M93RAmmo",0,"FailPickup")
    WEAP X 0 A_GiveInventory("M93RAmmo",20)
    stop
  OneManArmy:
    WEAP X 0
	WEAP X 0 A_JumpIfInventory("MaxWeaponsFilled",130,"FailPickup2")
	WEAP X 0 A_GiveInventory("MaxWeaponsFilled",8)
	WEAP X 0 ACS_NamedExecuteWithResult("RefPickU",22,0,0)
	stop
  FailPickup:
    WEAP X 1
    fail
  FailPickup2:
    WEAP X 1
    WEAP X 0 ACS_NamedExecuteAlways("RefSlots",0,4,0,0)
    fail
  }
}

actor M93RDrop : M93RPickup
{
  States
  {
  Spawn:
    WEAP X -1
    stop
  Pickup:
    WEAP X 0
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Ex Mags",1,"AmmoPickup")
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Auto",1,"AmmoPickup")
    WEAP X 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP X 0 A_JumpIfInventory("MaxWeaponsFilled",93,"FailPickup2")
	WEAP X 0 A_GiveInventory("MaxWeaponsFilled",8)
    WEAP X 0 ACS_NamedExecuteWithResult("RefPickU",22,0,0)
    stop
  }
}

actor M93RDrop2 : M93RDrop
{
  States
  {
  Spawn:
    WEAP X -1
    stop
  Pickup:
    WEAP X 0
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Ex Mags",1,"AmmoPickup")
    WEAP X 0 A_JumpIfInventory("Beretta M93 Raffica Auto",1,"AmmoPickup")
    WEAP X 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEAP X 0 A_JumpIfInventory("MaxWeaponsFilled",93,"FailPickup2")
	WEAP X 0 A_GiveInventory("MaxWeaponsFilled",8)
    WEAP X 0 ACS_NamedExecuteWithResult("RefPickU",22,0,0)
    stop
  AmmoPickup:
    WEAP X 0
    stop
  }
}

actor HHCBM93R : HHBullet
{
  damage (random(13,19))
  Speed 300
  States
  {
  Spawn:
    TNT1 A 10
    TNT1 A 5 A_ScaleVelocity(0.67)
    stop
  Death:
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff", 0, 0, 0, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
    stop
  XDeath:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 5 A_PlaySound("generic/ricochets")
    stop
  Crash:
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_SpawnItemEx("ImpactSmokePuff_2", 0, 0, 0, 0, 0, 0, 0, 128, 0)
    TNT1 A 5 A_PlaySound("generic/ricochet")
    stop
  }
}