actor "RPG-7" : RGUWeapon
{
  obituary "%k splattered %o with the RPG-7."
  inventory.pickupmessage "You got the RPG-7. Just like in Afghan."
  +WEAPON.EXPLOSIVE
  +WEAPON.BFG
  weapon.selectionorder 20
  weapon.ammotype "RPGClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "RPGAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"PostReloadAlt")
    GRNA L 0 A_TakeInventory("weapondropper",2)
    RPGA A 0 A_PlaySoundEx("weapon/draw","SoundSlot5")
    RPGA B 2 A_JumpIfNoAmmo("ReadyEmpty")
    RPGA CDEF 2 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
    RPGA GH 3 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWZOOM)
    RPGA I 0 A_JumpIfNoAmmo("Reload")
	M4CC F 0 A_JumpIfInventory("weapondropper",1,"DropWeapon")
    RPGA I 0 A_JumpIfInventory("Aiming",1,5)
    RPGA I 0 A_JumpIfInventory("Reloading",1,"Reload")
    RPGA I 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    RPGA I 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGA I 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+11
    RPGB H 0 A_JumpIfInventory("Reloading",1,"Reload")
  ReadyAim:
    RPGB H 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    RPGB H 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3")
    RPGB H 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto Ready+17
  ReadyEmpty:
    GRNA L 0 A_TakeInventory("weapondropper",2)
    RPGE BCDEFGHI 2 A_WeaponReady(WRF_NOFIRE)
    RPGE I 0 A_JumpIfNoAmmo("Reload")
    RPGE I 0 A_JumpIfInventory("Aiming",1,5)
	RPGA I 0 A_JumpIfInventory("Reloading",1,"Reload")
    M4CC F 0 A_JumpIfInventory("weapondropper",1,"DropWeaponEmpty")
    RPGE I 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    RPGE I 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGE I 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto ReadyEmpty+11
    RPGF H 0
  ReadyAimEmpty:
    RPGF H 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    RPGF H 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
	G18A I 0 A_JumpIfInventory("weapondropper",1,"AltFire3Empty")
    RPGF H 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Goto ReadyEmpty+17
  Deselect:
    RPGA I 0 A_PlaySoundEx("weapon/down","SoundSlot5")
    RPGA I 0 A_JumpIfNoAmmo("DeselectEmpty")
    RPGA I 0 A_TakeInventory("Aiming",1)
    RPGA I 0 A_TakeInventory("Reloading",1)
    RPGA I 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGA I 0 A_ZoomFactor(1.0)
    RPGA I 0 A_Lower
    RPGA I 1 A_Lower
    Goto Deselect+6
  DeselectEmpty:
    RPGE I 0 A_TakeInventory("Aiming",1)
    RPGE I 0 A_TakeInventory("Reloading",1)
    RPGE I 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGE I 0 A_ZoomFactor(1.0)
    RPGE I 0 A_Lower
    RPGE I 1 A_Lower
    Goto Deselect+4
  Select:
    RPGA A 0 A_Raise
    Loop
  Fire:
    RPGA I 0 A_JumpIfInventory("Aiming",1,"FireAim")
    RPGA I 1 A_JumpIfNoAmmo("ReloadStart")
    RPGB A 0 A_GiveInventory("Aiming",1)
    RPGB A 2 A_ZoomFactor(1.2)
    RPGB A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGB A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    RPGB CDEFG 2
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC G 0 A_PlayWeaponSound("rpg/fire")
    RPGC A 1 BRIGHT A_FireCustomMissile("RPGMissile",frandom(-6.00,6.00),1,0,6,0,frandom(-3.75,3.75))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    RPGC B 2 BRIGHT A_GunFlash
    RPGC C 0 A_TakeInventory("Aiming",1)
    RPGC C 2 BRIGHT A_ZoomFactor(1.0)
    RPGC C 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGC DEFGH 2 BRIGHT
    RPGC H 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReadyEmpty+11
    RPGC H 0 A_JumpIfNoAmmo("ReloadStart2")
    Goto ReadyEmpty+11
  FireAim:
    RPGC H 0
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC H 0 A_PlayWeaponSound("rpg/fire")
    RPGC A 1 BRIGHT A_FireCustomMissile("RPGMissile",frandom(-1.00,1.00),1,0,6,0,frandom(-0.62,0.63))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    RPGC B 2 BRIGHT A_GunFlash
    RPGC C 0 A_TakeInventory("Aiming",1)
    RPGC C 2 BRIGHT A_ZoomFactor(1.0)
    RPGC C 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGC DEFGH 2 BRIGHT
    RPGC H 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReadyEmpty+11
    RPGC H 0 A_JumpIfNoAmmo("ReloadStart2")
    Goto ReadyEmpty+11
  Reload: //AltFire:
    RPGA A 0 A_JumpIfInventory("RPGClip",1,4)
    RPGA A 0 A_JumpIfInventory("RPGAmmo",1,"ReloadStart2")
    RPGA A 0 A_TakeInventory("Reloading",1)
    RPGA A 0 A_JumpIfInventory("Aiming",1,"ReadyAimEmpty")
    Goto ReadyEmpty+14
    RPGA A 0 A_TakeInventory("Reloading",1)
    RPGA A 0 A_JumpIfInventory("Aiming",1,"ReadyAim")
    Goto Ready+13
  ReloadStart2:
    RPGC A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
	Goto ReloadStart+1
  ReloadStart:
    RPGC A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim2")
    RPGC A 0 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    RPGC IJKLMNOPQ 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGC R 3 A_PlaySoundEx("rpg/in","SoundSlot5")
    RPGC STUVWXY 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    RPGC Z 3 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo
  ReloadAmmo:
    RPGC P 0 A_JumpIfInventory("RPGClip",1,"ReloadEnd")
    RPGC P 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReloadEnd
    RPGC P 0 A_GiveInventory("RPGClip",1)
    RPGC P 0 A_TakeInventory("RPGAmmo",1)
    Goto ReloadAmmo
  ReloadEnd:
    RPGD ABCDEF 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGD GHIJ 3 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    RPGD KLMNOP 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGD QRST 3 A_WeaponReady(WRF_NOBOB|WRF_NOPRIMARY|WRF_ALLOWZOOM)
    Goto Ready+11
  Zoom:
  PostReloadAlt:
    RPGF G 0 A_ZoomFactor(1.2)
    RPGF F 0 A_GiveInventory("Aiming",1)
    RPGF A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	RPGF ACDEFG 2
    Goto AltHold
  ReloadBreak:
    RPGF G 0 A_ZoomFactor(1.0)
    RPGF GF 2
    RPGF F 0 A_TakeInventory("Aiming",1)
    RPGF EDCA 2
    RPGF A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	TNT1 A 0 A_ClearReFire
    Goto Reload
  ClearRefire: 
    RPGB H 1 A_ClearReFire
	Goto AltHold
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("RPGClip",1,1)
	Goto ReloadBreak
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC H 0 A_PlayWeaponSound("rpg/fire")
	M79C P 0 A_TakeInventory("RPGClip",1)
    RPGC A 1 BRIGHT A_FireCustomMissile("RPGMissile",frandom(-1.00,1.00),1,0,6,0,frandom(-0.62,0.63))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfInventory("RPGClip",1,1)
	Goto ReloadBreak
	TNT1 A 0
    Goto AltHold
  AltHold:
    A12C C 0 A_JumpIfInventory("FireHeld",1,"ClearRefire")
    RPGB H 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")
	"####" "#" 0 A_JumpIfInventory("RPGClip",1,1)
	Goto AltFire2Empty
	A12C C 0 A_JumpIfInventory("Aiming",1,"AltFire2")
	Goto Ready+17
  AltFire:
    GRNA L 0 A_TakeInventory("weapondropper",2)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"AltHold")
    RPGB A 0 A_JumpIfInventory("RPGClip",1,1)
    Goto AltFireEmpty
    RPGB A 0 A_ZoomFactor(1.2)
    RPGB A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    RPGB AC 3
    RPGB C 0 A_GiveInventory("Aiming",1)
    RPGB DEFG 3
    RPGB G 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	A12C F 0 A_Refire("AltHold")
    Goto Ready+17
  AltFireEmpty:
    RPGF A 0 A_ZoomFactor(1.2)
	M4CA C 0 A_JumpIfInventory("AltFireHeld",1,"AltHold")
    RPGF A 0 A_JumpIfInventory("Aiming",1,"AltFire2Empty")
    RPGF AC 2
    RPGF C 0 A_GiveInventory("Aiming",1)
    RPGF DEFG 2
    RPGF G 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	A12C F 0 A_Refire("AltHold")
    Goto ReadyEmpty+17
  AltFire2:
    RPGB G 0 A_ZoomFactor(1.0)
    RPGB GF 2
    RPGB F 0 A_TakeInventory("Aiming",1)
    RPGB EDCA 2
    RPGB A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto Ready+11
  AltFire3:
    RPGB G 0 A_ZoomFactor(1.0)
    RPGB GF 2
    RPGB F 0 A_TakeInventory("Aiming",1)
    RPGB EDCA 2
    RPGB A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	goto DropWeapon
  AltFire2Empty:
    RPGF G 0 A_ZoomFactor(1.0)
    RPGF GF 1
    RPGF F 0 A_TakeInventory("Aiming",1)
    RPGF EDCA 1
    RPGF A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReadyEmpty+11
  AltFire3Empty:
    RPGF G 0 A_ZoomFactor(1.0)
    RPGF GF 1
    RPGF F 0 A_TakeInventory("Aiming",1)
    RPGF EDCA 1
    RPGF A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
	goto DropWeaponEmpty
  ReloadStartAim:
    RPGF G 0 A_ZoomFactor(1.0)
    RPGF GF 2
    RPGF F 0 A_TakeInventory("Aiming",1)
    RPGF EDCA 2
    RPGF A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+1
  ReloadStartAim2:
    RPGF G 0 A_ZoomFactor(1.0)
    RPGF GF 1
    RPGF F 0 A_TakeInventory("Aiming",1)
    RPGF EDCA 1
    RPGF A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    Goto ReloadStart+1
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEP2 I 0
    WEP2 I 0 A_SpawnItem("RPGDrop")
    stop
  Fire_SteadyAim:
    RPGB CDEFG 2
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC G 0 A_PlayWeaponSound("rpg/fire")
    RPGC A 1 BRIGHT A_FireCustomMissile("RPGMissile",frandom(-4.50,4.50),1,0,6,0,frandom(-2.75,2.75))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    RPGC B 2 BRIGHT A_GunFlash
    RPGC C 0 A_TakeInventory("Aiming",1)
    RPGC C 2 BRIGHT A_ZoomFactor(1.0)
    RPGC C 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGC DEFGH 2 BRIGHT
    RPGC H 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReadyEmpty+11
    RPGC H 0 A_JumpIfNoAmmo("ReloadStart2")
    Goto ReadyEmpty+11
  ReloadStart_SOH:
    RPGC IJKLMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGC Q 2 A_PlaySoundEx("rpg/in","SoundSlot5")
    RPGC RSTUVWXY 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    RPGC Z 2 A_TakeInventory("Reloading",1)
    Goto ReloadAmmo_SOH
  ReloadAmmo_SOH:
    RPGC P 0 A_JumpIfInventory("RPGClip",1,"ReloadEnd_SOH")
    RPGC P 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReloadEnd_SOH
    RPGC P 0 A_GiveInventory("RPGClip",1)
    RPGC P 0 A_TakeInventory("RPGAmmo",1)
    Goto ReloadAmmo_SOH
  ReloadEnd_SOH:
    RPGD ABCDEF 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGD GHIJ 2 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
    RPGD KLMNOP 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    RPGD QRST 2 A_WeaponReady(WRF_NOBOB|WRF_NOPRIMARY|WRF_ALLOWZOOM)
    Goto Ready+11
  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:
    RPGA HGFEDCB 2 A_WeaponReady(WRF_NOPRIMARY)
	RGPA 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("RPGDropped",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("RPGThrown",0,0,7,2)
	stop
  DropWeaponEmpty:
    RPGE HGFEDCB 2 A_WeaponReady(WRF_NOPRIMARY)
	RGPE 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("RPGDropped",0,0,7,2)
	stop

  }
}

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

actor RPGAmmo : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 1
    inventory.maxamount 4
    ammo.backpackamount 2
    ammo.backpackmaxamount 7
}

actor RPGMissile
{
  obituary "%k splattered %o with the RPG-7."
  radius 5
  height 5
  speed 67//30//25
  damage (210)
  PROJECTILE
  //+NOEXTREMEDEATH
  +FORCERADIUSDMG
  +FORCEXYBILLBOARD
  +THRUSPECIES
  species "Player"
  Scale 0.14
  decal Scorch
  damagetype "Explosion"
  ProjectileKickBack 35
  states
  {
  Spawn:
    G69X A 0
    G69X A 0 A_PlaySoundEx("rpg/fly","Body",1)
    G69X A 0 A_SpawnItemEx("WeaponSmokePuffLong_Spawned",-20,0,0,0,0,0,0,128,0)
    G69X A 1 A_SpawnItemEx("MissileExhaust",-20,0,0,0,0,0,0,128,0)
    G69X A 0 A_GiveInventory("M203Armed",1)
    G69X A 1 A_SpawnItemEx("MissileExhaust",-20,0,0,0,0,0,0,128,0)
    G69X A 0 A_SpawnItemEx("WeaponSmokePuffLong_Spawned",-20,0,0,0,0,0,0,128,0)
    G69X AA 1 A_SpawnItemEx("MissileExhaust",-20,0,0,0,0,0,0,128,0)
    Goto Spawn+6
  Death:
    TNT1 A 0
    TNT1 A 0 A_JumpIfInventory("M203Armed",1,"DeathArmed")
    TNT1 A 0 Radius_Quake(3,9,0,11,0)
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 AA 0 A_Explode(35,96)
    TNT1 AA 0 A_Explode(10,192,0)
    TNT1 A 0 A_SetDamageType("explosionc")
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 A 0 A_Explode(10,192,0)
	TNT1 A 0 A_PlaySoundEx("generic/explosion","SoundSlot5")
    TNT1 A 0 A_PlaySoundEx("distant/explosion","SoundSlot6")
    TNT1 AA 0 A_SpawnItemEx("ExplosionMain3", random(-4,4), random(-4,4), 0)
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx("ImpactSpark2", random(-16,16), random(-16,16), random(-8,12), random(-3,3), random(-3,3), random(-1,2), 0, 128, 0)
    TNT1 A 10
    TNT1 A 5 A_AlertMonsters(384)
    stop
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_JumpIfInventory("M203Armed",1,"DeathArmed")
    TNT1 A 0 Radius_Quake(3,9,0,11,0)
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 AA 0 A_Explode(35,96)
    TNT1 AA 0 A_Explode(10,192,0)
    TNT1 A 0 A_SetDamageType("explosionc")
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 A 0 A_Explode(10,192,0)
	TNT1 A 0 A_PlaySoundEx("generic/explosion","SoundSlot5")
    TNT1 A 0 A_PlaySoundEx("distant/explosion","SoundSlot6")
    TNT1 AA 0 A_SpawnItemEx("ExplosionMain3", random(-4,4), random(-4,4), 0)
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx("ImpactSpark2", random(-16,16), random(-16,16), random(-8,12), random(-3,3), random(-3,3), random(-1,2), 0, 128, 0)
    TNT1 A 10
    TNT1 A 5 A_AlertMonsters(384)
    stop
  DeathArmed:
    TNT1 A 0
    TNT1 A 0 Radius_Quake(4,14,0,20,0)
    TNT1 A 0 A_Explode(175,96,0)
    TNT1 AA 0 A_Explode(75,144)
    TNT1 AA 0 A_Explode(40,405,0)
    TNT1 A 0 A_SetDamageType("explosionc")
    TNT1 A 0 A_Explode(175,96,0)
    TNT1 A 0 A_Explode(40,405,0)
    TNT1 AA 0 A_SpawnItemEx("ExplosionMain",random(-8,8),random(-8,8),0)
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx("ImpactSpark2", random(-32,32), random(-32,32), random(-16,24), random(-5,5), random(-5,5), random(-3,4), 0, 128, 0)
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx("ImpactSpark2", random(-32,32), random(-32,32), random(-16,24), random(-5,5), random(-5,5), random(-3,4), 0, 128, 0)
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx("ImpactSpark2", random(-32,32), random(-32,32), random(-16,24), random(-5,5), random(-5,5), random(-3,4), 0, 128, 0)
    TNT1 A 10
    TNT1 A 5 A_AlertMonsters(810)
    stop
  }
}

actor "RPG-7 Incendiary" : "RPG-7"
{
  states
  {
  Fire:
    RPGA I 0 A_JumpIfInventory("Aiming",1,"FireAim")
    RPGA I 1 A_JumpIfNoAmmo("ReloadStart")
    RPGB A 0 A_GiveInventory("Aiming",1)
    RPGB A 2 A_ZoomFactor(1.2)
    RPGB A 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGB A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    RPGB CDEFG 2
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC G 0 A_PlayWeaponSound("rpg/fire")
    RPGC A 1 BRIGHT A_FireCustomMissile("IncRPGMissile",frandom(-6.00,6.00),1,0,6,0,frandom(-3.75,3.75))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    RPGC B 2 BRIGHT A_GunFlash
    RPGC C 0 A_TakeInventory("Aiming",1)
    RPGC C 2 BRIGHT A_ZoomFactor(1.0)
    RPGC C 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGC DEFGH 2 BRIGHT
    RPGC H 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReadyEmpty+11
    RPGC H 0 A_JumpIfNoAmmo("ReloadStart2")
    Goto ReadyEmpty+11
  FireAim:
    RPGC H 0
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC H 0 A_PlayWeaponSound("rpg/fire")
    RPGC A 1 BRIGHT A_FireCustomMissile("IncRPGMissile",frandom(-1.00,1.00),1,0,6,0,frandom(-0.62,0.63))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    RPGC B 2 BRIGHT A_GunFlash
    RPGC C 0 A_TakeInventory("Aiming",1)
    RPGC C 2 BRIGHT A_ZoomFactor(1.0)
    RPGC C 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGC DEFGH 2 BRIGHT
    RPGC H 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReadyEmpty+11
    RPGC H 0 A_JumpIfNoAmmo("ReloadStart2")
    Goto ReadyEmpty+11
  Fire_SteadyAim:
    RPGB CDEFG 2
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC G 0 A_PlayWeaponSound("rpg/fire")
    RPGC A 1 BRIGHT A_FireCustomMissile("IncRPGMissile",frandom(-4.50,4.50),1,0,6,0,frandom(-2.75,2.75))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    RPGC B 2 BRIGHT A_GunFlash
    RPGC C 0 A_TakeInventory("Aiming",1)
    RPGC C 2 BRIGHT A_ZoomFactor(1.0)
    RPGC C 0 ACS_NamedExecuteAlways("RefSpeed",0,0,0,0)
    RPGC DEFGH 2 BRIGHT
    RPGC H 0 A_JumpIfInventory("RPGAmmo",1,1)
    Goto ReadyEmpty+11
    RPGC H 0 A_JumpIfNoAmmo("ReloadStart2")
    Goto ReadyEmpty+11
  FireAimAltHold:
    "####" "#" 0 A_JumpIfInventory("RPGClip",1,1)
	Goto ReloadBreak
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,0,6)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,-4,0)
    RPGC H 0 A_FireCustomMissile("WeaponSmokePuffLong",0,0,4,0)
    RPGC G 0 A_FireCustomMissile("WeaponSmokePuff_ShotMuzzle",0,0,0,6)
	RPGC H 0 A_PlayWeaponSound("rpg/fire")
	M79C P 0 A_TakeInventory("RPGClip",1)
    RPGC A 1 BRIGHT A_FireCustomMissile("IncRPGMissile",frandom(-1.00,1.00),1,0,6,0,frandom(-0.62,0.63))
    RPGC A 1 BRIGHT ACS_NamedExecuteAlways("RefKick",0,0,0,0)
    "####" "#" 0 A_JumpIfInventory("RPGClip",1,1)
	Goto ReloadBreak
	TNT1 A 0
    Goto AltHold
  }
}

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

actor IncRPGMissile : RPGMissile
{
  damage (140)
  states
  {
  Spawn:
    G69X A 0
    G69X A 0 A_PlaySoundEx("rpg/fly","Body",1)
    G69X A 0 A_SpawnItemEx("WeaponSmokePuffLong_Spawned",-20,0,0,0,0,0,0,128,0)
    G69X A 1 A_SpawnItemEx("MissileExhaust",-20,0,0,0,0,0,0,128,0)
    G69X A 0 A_GiveInventory("M203Armed",1)
    G69X A 1 A_SpawnItemEx("MissileExhaust",-20,0,0,0,0,0,0,128,0)
    G69X A 0 A_SpawnItemEx("WeaponSmokePuffLong_Spawned",-20,0,0,0,0,0,0,128,0)
    G69X AA 1 A_SpawnItemEx("MissileExhaust",-20,0,0,0,0,0,0,128,0)
    Goto Spawn+6
  Death:
    TNT1 A 0
    TNT1 A 0 A_JumpIfInventory("M203Armed",1,"DeathArmed")
    TNT1 A 0 Radius_Quake(2,8,0,9,0)
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 A 0 A_Explode(35,96)
    TNT1 A 0 A_Explode(5,192,0)
    TNT1 A 0 A_SetDamageType("explosionc")
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 A 0 A_Explode(5,192,0)
	TNT1 A 0 A_PlaySoundEx("generic/explosionsmall","SoundSlot5")
    TNT1 A 0 A_PlaySoundEx("distant/explosionsmall","SoundSlot6")
    TNT1 AA 0 A_SpawnItemEx("ExplosionSmall2", random(-4,4), random(-4,4), 0, 0, 0, 0, 0, 128, 0)
    TNT1 AAAAAA 0 A_SpawnItemEx("IncGrenadeFire", random(-32,32), random(-32,32), random(0,16), random(-15,15)/10.0, random(-15,15)/10.0, random(4,5), 0, 0, 0)
    TNT1 AAAAAA 0 A_SpawnItemEx("IncGrenadeFireLight", random(-32,32), random(-32,32), random(0,16), random(-15,15)/10.0, random(-15,15)/10.0, random(4,5), 0, 128, 0)
    TNT1 AAAAAA 0 A_SpawnItemEx("IncGrenadeFireLight", random(-32,32), random(-32,32), random(0,16), random(-15,15)/10.0, random(-15,15)/10.0, random(4,5), 0, 128, 0)
    TNT1 A 10
    TNT1 A 5 A_AlertMonsters(384)
    stop
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_GiveToTarget("HitIndicator",1)
    TNT1 A 0 A_JumpIfInventory("M203Armed",1,"DeathArmed")
    TNT1 A 0 Radius_Quake(2,8,0,9,0)
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 A 0 A_Explode(35,96)
    TNT1 A 0 A_Explode(5,192,0)
    TNT1 A 0 A_SetDamageType("explosionc")
    TNT1 A 0 A_Explode(55,48,0)
    TNT1 A 0 A_Explode(5,192,0)
	TNT1 A 0 A_PlaySoundEx("generic/explosionsmall","SoundSlot5")
    TNT1 A 0 A_PlaySoundEx("distant/explosionsmall","SoundSlot6")
    TNT1 AA 0 A_SpawnItemEx("ExplosionSmall2", random(-4,4), random(-4,4), 0, 0, 0, 0, 0, 128, 0)
    TNT1 AAAAAA 0 A_SpawnItemEx("IncGrenadeFire", random(-32,32), random(-32,32), random(0,16), random(-15,15)/10.0, random(-15,15)/10.0, random(4,5), 0, 0, 0)
    TNT1 AAAAAA 0 A_SpawnItemEx("IncGrenadeFireLight", random(-32,32), random(-32,32), random(0,16), random(-15,15)/10.0, random(-15,15)/10.0, random(4,5), 0, 128, 0)
    TNT1 AAAAAA 0 A_SpawnItemEx("IncGrenadeFireLight", random(-32,32), random(-32,32), random(0,16), random(-15,15)/10.0, random(-15,15)/10.0, random(4,5), 0, 128, 0)
    TNT1 A 10
    TNT1 A 5 A_AlertMonsters(384)
    stop
  DeathArmed:
    TNT1 A 0
    TNT1 A 0 Radius_Quake(3,12,0,16,0)
    TNT1 A 0 A_Explode(175,96,0)
    TNT1 A 0 A_Explode(75,144)
    TNT1 A 0 A_Explode(20,405,0)
    TNT1 A 0 A_SetDamageType("explosionc")
    TNT1 A 0 A_Explode(175,96,0)
    TNT1 A 0 A_Explode(20,405,0)
    TNT1 AA 0 A_SpawnItemEx("ExplosionMain2",random(-8,8),random(-8,8),0)
    TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("IncGrenadeFire", random(-32,32), random(-32,32), random(0,16), random(-25,25)/10.0, random(-25,25)/10.0, random(4,5), 0, 0, 0)
    TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("IncGrenadeFireLight", random(-32,32), random(-32,32), random(0,16), random(-25,25)/10.0, random(-25,25)/10.0, random(4,5), 0, 128, 0)
    TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("IncGrenadeFireLight", random(-32,32), random(-32,32), random(0,16), random(-25,25)/10.0, random(-25,25)/10.0, random(4,5), 0, 128, 0)
    TNT1 A 10
    TNT1 A 5 A_AlertMonsters(810)
    stop
  }
}

actor RPGPickup : CustomInventory
{
  inventory.pickupmessage "You got the RPG-7. For the motherland!"
  inventory.pickupsound "rpg/in"
  +INVENTORY.AUTOACTIVATE
  //inventory.respawntics 70
  scale 0.2
  States
  {
  Spawn:
    WEP2 I -1
    stop
  Pickup:
    WEP2 I 0
    WEP2 I 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",0,0,0)) == 1, "PickupStay")
    WEP2 I 0 A_JumpIfInventory("RPG-7",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 I 0 A_JumpIfInventory("RPG-7 Incendiary",1,"AmmoPickup")
    WEP2 I 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 I 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEP2 I 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEP2 I 0 ACS_NamedExecuteWithResult("RefPickU",35,0,0)
    stop
  PickupStay:
    WEP2 I 0
    WEP2 I 0 A_JumpIfInventory("RPG-7",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 I 0 A_JumpIfInventory("RPG-7 Incendiary",1,"FailPickup")
    WEP2 I 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 I 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEP2 I 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEP2 I 0 ACS_NamedExecuteWithResult("RefPickU",35,0,0)
    WEP2 I 0 ACS_NamedExecuteWithResult("RefPickC",35,0,0)
    WEP2 I 0 A_PlaySound("rpg/in")
    fail
  AmmoPickup:
    WEP2 I 0
    WEP2 I 0 A_JumpIfInventory("RPGAmmo",0,"FailPickup")
    WEP2 I 0 A_GiveInventory("RPGAmmo",1)
    stop
  OneManArmy:
    WEP2 I 0
	WEP2 I 0 A_JumpIfInventory("MaxWeaponsFilled",113,"FailPickup2")
	WEP2 I 0 A_GiveInventory("MaxWeaponsFilled",25)
	WEP2 I 0 ACS_NamedExecuteWithResult("RefPickU",35,0,0)
	stop
  FailPickup:
    WEP2 I 1
    fail
  FailPickup2:
    WEP2 I 1
    WEP2 I 0 ACS_NamedExecuteAlways("RefSlots",0,35,0,0)
    fail
  }
}

actor RPGDrop : RPGPickup
{
  States
  {
  Spawn:
    WEP2 I -1
    stop
  Pickup:
    WEP2 I 0
    WEP2 I 0 A_JumpIfInventory("RPG-7",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 I 0 A_JumpIfInventory("RPG-7 Incendiary",1,"AmmoPickup")
    WEP2 I 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 I 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEP2 I 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEP2 I 0 ACS_NamedExecuteWithResult("RefPickU",35,0,0)
    stop
  }
}

actor RPGDrop2 : RPGDrop
{
  States
  {
  Spawn:
    WEP2 I -1
    stop
  Pickup:
    WEP2 I 0
    WEP2 I 0 A_JumpIfInventory("RPG-7",1,"AmmoPickup") // If the player already has this weapon, they get more ammo for it
    WEP2 I 0 A_JumpIfInventory("RPG-7 Incendiary",1,"AmmoPickup")
    WEP2 I 0 A_JumpIfInventory("Perk1_OneManArmy",1,"OneManArmy")
    WEP2 I 0 A_JumpIfInventory("MaxWeaponsFilled",76,"FailPickup2")
	WEP2 I 0 A_GiveInventory("MaxWeaponsFilled",25)
    WEP2 I 0 ACS_NamedExecuteWithResult("RefPickU",35,0,0)
    stop
  AmmoPickup:
    WEP2 I 0
    stop
  }
}