// Handgun
actor Handgun : AOWWeapon replaces Pistol 21041 {
	//$Category Weapons
	+WIMPY_WEAPON
	+NOAUTOFIRE
	Weapon.AmmoUse 1
	Weapon.AmmoGive 10
	Weapon.AmmoType "NewClipAmmo"
	Weapon.SelectionOrder 19
	Weapon.PreferredSkin "MarinePistol"
	Inventory.Pickupmessage "You got the handgun!"
	Obituary "%o was capped by %k's handgun."
	AttackSound "pistol/fire"
	States {
	Ready:
		PISG A 1 A_WeaponReady
		Loop
	Deselect:
		PISG A 0 A_Lower
		PISG A 1 A_Lower
		Loop
	Select:
		PISG A 0 A_Raise
		PISG A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory ("IsInSpawnRoom", 1, "Ready")
		TNT1 A 0 A_JumpIfInventory ("InMenu", 1, "Ready")
		PISG B 0 A_SpawnItemEx ("ShellCasing", 9, 12, 35,
			random (-2, -4), random (2, 3), random (1, 3), random (45, 60))
		PISG B 0 A_FireBullets (2.0, 2.0, -1, 4, "HandgunPuff", 1, 1536)
		PISG B 4 A_GunFlash
		PISG C 2 A_WeaponReady (WRF_NOBOB)
		PISG B 3 A_WeaponReady (WRF_NOBOB)
		PISG A 0 A_ReFire
		Goto Ready
	Flash:
		PISF A 1 Bright A_Light2
		PISF A 1 Bright A_Light1
		Goto LightDone
	Spawn:
		PIST A -1
		stop
	}
}

actor HandgunPuff : HHBulletPuff {
	DamageType "Bullet"
}

/////////////////What.

actor ArmyCreator : AOWWeapon
{
  attacksound "pistol/fire"
  Weapon.SelectionOrder 99
  Weapon.AmmoUse 1
  Weapon.AmmoGive 0
  Weapon.AmmoType "NewClipAmmo"
  Weapon.AmmoUse2 1
  Weapon.AmmoType2 "NewClipAmmo"
  Obituary "%o was capped by %k's handgun."
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "Got the handgun!"
  States
  {
  Ready:
    PISG A 1 A_WeaponReady
    Loop
  Deselect:
    PISG A 1 A_Lower
    Loop
  Select:
    PISG A 1 A_Raise
    Loop
  Fire:
    PISG A 3
    PISG B 0 A_SpawnItemEx("ShellCasing",8,8,32,random(1,3),random(0,1),random(1,3),random(45,60),128)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36,0,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36,36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36,72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36,108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36,-36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36,-72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36,-108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",72,0,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",72,36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",72,72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",72,108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",72,-36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",72,-72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",72,-108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",108,0,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",108,36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",108,72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",108,108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",108,-36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",108,-72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",108,-108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*4,0,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*4,36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*4,72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*4,108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*4,-36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*4,-72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*4,-108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*5,0,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*5,36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*5,72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*5,108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*5,-36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*5,-72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*5,-108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*6,0,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*6,36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*6,72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*6,108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*6,-36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*6,-72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*6,-108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*7,0,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*7,36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*7,72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*7,108,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*7,-36,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*7,-72,0,0,0,0,0,0,0)
    PISG B 0 A_SpawnItemEx("DoomPlayer",36*7,-108,0,0,0,0,0,0,0)
    PISG B 6 A_GunFlash
    PISG C 5
    PISG B 4 A_ReFire
    Goto Ready
  Flash:
    PISF A 2 Bright A_Light2
    PISF A 2 Bright A_Light1
    Goto LightDone
  AltFlash:
    PISF A 1 Bright A_Light2
    PISF A 1 Bright A_Light1
    Goto LightDone
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_SpawnItem("Handgun")
    stop
  }
}
