ACTOR	"Panzerfaust": Weapon
{
  Weapon.AmmoUse 1
  Weapon.AmmoGive 1
  Weapon.SlotNumber 9
  Weapon.AmmoType "RocketAmmo"
   +WEAPON.NOAUTOFIRE
    States
  {
    altfire:
  PZFL E 3 A_JumpIfInventory("Panzerfaustaim",1,"Aimingout")
  PZFL E 3 A_GiveInventory("Panzerfaustaim",1)
  //fall through
  Aiming:
    PZFL E 1 
    PZFL E 1 A_GiveInventory ("Panzerfaustaim", 1)
    PZFL E 1 A_WeaponReady(WRF_NOBOB)
	Loop
  Aimingout:
    TNT1 A 0 
    TNT1 A 0 A_TakeInventory ("Panzerfaustaim", 1)
    Goto "AltFireDone"
   AltFireDone: 
   PZFG A 1 A_WeaponReady
  Ready:
    PZFG A 0 
    PZFG A 0 
    PZFG A 0
	PZFG A 1 A_WeaponReady
    Loop
	
  Deselect:
    TNT1 A 0 A_TakeInventory("Panzerfaustaim",1)
    TNT1 A 0 
	PZFG A 1 A_Lower
    Loop
     
  Select:
    PZFG A 0 
	PZFG A 0 
	PZFG A 1 A_Raise 
    PZFG A 0 
	Loop 
   Fire:
    PZFG B 0 A_GunFlash  
	PZFG B 0 A_JumpIfInventory("Panzerfaustaim",1,"Fireaim")
	Goto Fireaim
	PZFG B 8 A_FireCustomMissile("Faustwarhead",0,1,8,8,0) 
    Goto Reload 
	PZFG B 0 A_JumpIfInventory("Faustloaded",1,"Reload")
	PZFG B 0 A_GiveInventory("Faustloaded",1)
	PZFG B 12 
    PZFG B 0 A_ReFire
    Goto Ready
	Fireaim:
	PZFL E 0 A_PlaySound("PZFIRE",1,5,0)
	PZFL E 1 A_FireCustomMissile("Faustwarhead",0,1,0,-33,0)
	PZFL F 1
	PZFF G 1
	PZFL H 1
	PZFL I 1
	PZFL J 1
	PZFL K 1
	PZFL L 1
	PZFL M 1
	PZFL N 1  A_CheckReload
	      
	Goto Reload
  Reload:
  
  TNT1 A 8 A_TakeInventory("Faustloaded", 1)
  PZFG A 1 offset (0,82) A_PlayWeaponSound("weapon/select")
  PZFG A 1 offset (0,72)
  PZFG A 1 offset (0,62)
  PZFG A 1 offset (0,52)
  PZFG A 1 offset (0,44)
  PZFG A 1 offset (0,38)
  PZFG A 1 offset (0,35)
   Goto Ready 
  Spawn:
    PANZ A -1
    stop
  
   }
}

actor Faustwarhead
 {
   radius 2
   height 2
   speed 33
   damage (4500)
   +ROCKETTRAIL
   PROJECTILE
   -NOGRAVITY
   gravity 0.2
   SeeSound "launch1"
   DeathSound "impacthit"
   DamageType "Explosion"
   states
  {
   spawn:
    1IBM A 1 Bright 
    Loop
   Death:
    MISL B 0 A_PlaySound("EXPL",1,5,0)
    MISL B 8 Bright  A_Explode(200,150)
    MISL C 6 Bright  
    MISL D 4 Bright  Radius_Quake(6,9,7,11,0)
    Stop
  }
}

Actor Panzerfaustaim : inventory
{
inventory.amount 1
}


ACTOR Faustloaded : Ammo
{
 Inventory.MaxAmount 1
 +IGNORESKILL
  }
  