ACTOR MP40 : Weapon
{
     Weapon.SlotNumber 2
     Weapon.SelectionOrder 901
     Inventory.PickupSound "gen/pickup"
      Inventory.Pickupmessage "You picked up an mp40!"
	  Weapon.UpSound "gen/wepswitch"
      SCALE 0.50
     Obituary "%k \cbbullet-whored\c- %o \cbwith an MP40\c-"
	 Attacksound "mp40/shoot"
     States 
     { 
     Spawn: 
        PM40 A -1 
        Stop 
     Ready: 
        MP40 A 1 A_WeaponReady 
        LOOP 
     Deselect: 
        MP40 A 1 A_Lower 
        LOOP 
     Select:
        MP40 A 1 A_Raise
        LOOP 
     Fire: 
		TNT1 A 0 A_JumpIfInventory("CoopModeOn", 1, "CoopFire")
		TNT1 A 0 A_FireBullets(3.6,3.0,1,5,"RottPuff",1)
	Continue:
        MP40 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_GunFlash
        MP40 B 1 Bright A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
        MP40 C 1 Offset(0,32) A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		MP40 C 1 Offset(0,34) A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		MP40 A 1 Offset(0,32) A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_Refire
        MP40 A 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
        Goto Ready 
	CoopFire:
		TNT1 A 0 A_PlaySound("mp40/shoot")
		TNT1 A 0 A_FireCustomMissile("RottMP40Bullet", random(-36,36)/10.0, 0, 0, 0, 0, random(-30,30)/10.0)
		Goto continue
     } 
}

actor RottMP40Bullet : RottPistolBullet
{
    Damage (random(1,3)*5)
    Obituary "%k \cbbullet-whored\c- %o \cbwith an MP40\c-"
}