ACTOR PioneerPistol : Weapon
{
  Weapon.KickBack 50
  Decal BulletChip
  Tag "50. AE Dominator"
  DamageType "Bullet"
  Weapon.AmmoType "Clip"
  Weapon.AmmoUse 1
  +WEAPON.NOAUTOAIM
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  Inventory.RestrictedTo "PioneerClass"
  	AttackSound "weapons/deagle"
  
  States
  {
  Ready:
    RFLP A 1 A_WeaponReady(WRF_ALLOWRELOAD)
	Loop
  Deselect:
    RFLP A 0 A_Lower
    TNT1 A 0 A_Lower
    TNT1 A 0 A_Lower
    Loop
  Select:
    RFLP A 0 A_Raise
    RFLP A 1 A_Raise
    TNT1 A 0 A_Raise
    TNT1 A 0 A_Raise
    Loop
  Fire:
   RFLP A 1 OFFSET(0,32)
   TNT1 A 0 A_PLAYWEAPONSOUND("weapons/deagle")
   RFLP B 1 OFFSET(0,34) BRIGHT A_FireBullets(0,0,-1,22,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
   RFLP D 2 OFFSET(0,39)
   RFLP D 2 OFFSET(0,37)
   RFLP C 2 OFFSET(0,36)
   RFLP C 2 OFFSET(0,35)
   RFLP A 1 OFFSET(0,33) 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

  }
}