ACTOR "RPistol" : Weapon
{
      Weapon.SlotNumber 1
      Weapon.SelectionOrder 905
      Weapon.UpSound "gen/wepswitch"
      Inventory.PickupSound "gen/pickup"
      Inventory.Pickupmessage "You got a pistol!"
      SCALE 0.50
      AttackSound "rott/pistolf"
      Obituary "%k \cbsniped\c- %o \cbwith a pistol\c-"
     States 
     { 
     Spawn: 
        PPST A -1 
        Stop 
     Ready: 
        RISG A 1 A_WeaponReady 
        LOOP 
     Deselect: 
        RISG A 1 A_Lower 
        LOOP 
     Select:
        RISG A 1 A_Raise 
        LOOP 
     Fire:
        RISG A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_JumpIfInventory("CoopModeOn", 1, "CoopFire")
		TNT1 A 0 A_FireBullets(1.3,1.3,-1,7,"RottPuff",1)
	Continue:
        RISF A 2 Bright A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
        RISG B 7 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		RISG A 5 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_Refire
		RISG A 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
        Goto Ready 
	CoopFire:
		TNT1 A 0 A_PlayWeaponSound("rott/pistolf")
		TNT1 A 0 A_FireCustomMissile("RottPistolBullet", random(-13,13)/10.0, 0, 0, 0, 0, random(-13,13)/10.0)
		Goto Continue
     } 
}    

actor RottPistolBullet : FastProjectile
{
    Damage (random(1,3)*7)
    Radius 1
    Height 1
    Speed 300
    Projectile
    Obituary "%k \cbsniped\c- %o \cbwith a pistol\c-"
    DamageType "RottBullet"
    Renderstyle "Normal"
    +BLOODSPLATTER
    +NOTIMEFREEZE
	+THRUSPECIES
	+SKYEXPLODE
	Species "Player"
    Alpha 1.0
    Decal Bulletchip
    States
    {
      Spawn:
        TNT1 A 1
        loop

      Death:
        TNT1 A 1 A_SpawnItem("RottPuff")
        stop

      XDeath:
        TNT1 A 1
        stop
    }
}