ACTOR PioneerMachinegun : Weapon
{
  Weapon.KickBack 25
  Weapon.SelectionOrder 700
  Decal BulletChip
  Tag "Portable Mini Gun 09"
  DamageType "Bullet"
   Weapon.AmmoType "Clip"
   Weapon.AmmoUse 1
  Obituary "%o was Crossfired by %k's PMG09"
  +WEAPON.NOAUTOAIM
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
   Inventory.RestrictedTo "PioneerClass"
  States
  {
  Ready:
    MCKG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
	Loop
  Deselect:
    MCKG A 0 A_Lower
    Loop
  Select:
    MCKG A 0 A_Raise
    MCKG A 1 A_Raise
    Loop
  Fire:
  MCKG A 1
  TNT1 A 0 A_PLAYWEAPONSOUND("DSCHNFIR")
  MCKG B 2 OFFSET(0,35) BRIGHT A_FireBullets(0,0,-1,38,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
  MCKG B 1 OFFSET(0,33) BRIGHT
   TNT1 A 0 A_PLAYWEAPONSOUND("DSCHNFIR")
  MCKG C 2 OFFSET(0,35) BRIGHT A_FireBullets(0,0,-1,38,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
  MCKG C 1 OFFSET(0,33) BRIGHT
  MCKG A 1 A_REFIRE
    Goto Ready
		  AltFire:
	PIPW CB 1 A_SpawnItemEx("SentryGunShadow", 35, 0, 4, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION|SXF_CLIENTSIDE)
  AltHold:
	TNT1 A 0 ACS_NamedExecute("SentryPlacing",0)
	PIPW A 1 A_SpawnItemEx("SentryGunShadow", 35, 0, 4, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION|SXF_CLIENTSIDE)
	TNT1 A 0 A_Refire("AltHold")
	TNT1 A 0 A_ChangeFlag(ISMONSTER,1)
	TNT1 A 0 A_SpawnItemEx("PioneerSentryGun", 35, 0, 4, 0, 0, 0, 0, SXF_SETMASTER|SXF_TRANSFERTRANSLATION)
	TNT1 A 0 A_ChangeFlag(ISMONSTER,0)
	PIPW BCDEFGHI 1
	TNT1 A 6
	Goto Ready

  }
}
