Actor ChaingunMajor : ChaingunGuy
{
  Health 80
  Painchance 192
  PainChance "Fire", 256
  SeeSound "Chainguy/Sight"
  ActiveSound "Chainguy/Active"
  PainSound "Chainguy/Pain"
  DeathSound "Chainguy/Death"
  Obituary "%o was perforated by a chaingun major."
  DropItem "VGun"
  Speed 4
  Tag "Chaingun Major"
  States
  {
  Spawn:
    CPS2 A 10 A_Look
    Loop
  See:
    CPS2 AAAABBBB 1 A_Chase
	CPS2 C 0 A_PlaySound("Cyber/Hoof", CHAN_BODY)
	CPS2 CCCCDDDD 1 A_Chase
	CPS2 A 0 A_PlaySound("Cyber/Hoof", CHAN_BODY)
    Loop
  Missile:
    CPS2 E 10 A_FaceTarget
    CPS2 FE 3 A_CPosAttack
    CPS2 F 1 A_CPosRefire
    Goto Missile+1
  Pain:
    CPS2 G 3
    CPS2 G 3 A_Pain
    Goto See
  Death:
	CPS2 G 0 A_Jump(256, "Death1", "Death2", "Death3")
  Death1:
    CPS2 H 5
    CPS2 I 5 A_Scream
    CPS2 J 5 A_Fall
    CPS2 KLM 5
	CPS2 N 0 A_PlaySound("body/hitfloor")
	CPS2 NO 5
	CPS2 P 10
	TNT1 A 0 A_Jump(16, "KillTaunt")
    CPS2 P -1
    Stop
  Death2:
    CPS2 Q 5
    CPS2 R 5 A_Scream
    CPS2 S 5 A_Fall
	CPS2 T 0 A_PlaySound("body/hitfloor")
	CPS2 TU 5
	CPS2 V 10
	TNT1 A 0 A_Jump(5, "KillTaunt2")
    CPS2 V -1
    Stop
  Death3:
    CPS2 W 5
    CPS2 X 5 A_Scream
    CPS2 Y 5 A_Fall
	CPS2 Z 5
	CPS3 A 0 A_PlaySound("body/hitfloor")
	CPS3 A 10
	TNT1 A 0 A_Jump(5, "KillTaunt3")
    CPS3 A -1
    Stop
  KillTaunt:
	TNT1 A 0 A_PlaySound("player/killtaunt", CHAN_AUTO)
	CPS2 V -1
	Stop
  KillTaunt2:
	TNT1 A 0 A_PlaySound("player/killtaunt", CHAN_AUTO)
	CPS2 P -1
	Stop
  KillTaunt3:
	TNT1 A 0 A_PlaySound("player/killtaunt", CHAN_AUTO)
	CPS3 A -1
	Stop
  XDeath:
	TNT1 A 0 A_XScream
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_SpawnDebris("SkullGib")
	TNT1 A 0 A_SpawnDebris("DukeGibs1")
	TNT1 A 0 A_SpawnDebris("DukeGibs2")
	TNT1 A 0 A_SpawnDebris("DukeGibs3")
	TNT1 A 0 A_SpawnDebris("GutsGib")
	TNT1 A 0 A_SpawnDebris("DukeGibs5")
	TNT1 A 0 A_SpawnDebris("BloodSplurt")
	TNT1 A 0 A_Jump(16, "GibTaunt")
    Stop
  GibTaunt:
	TNT1 A 0 A_PlaySound("player/gibtaunt", CHAN_AUTO)
	Stop
  Raise:
    CPS2 P 5
    CPS2 ONMLKJIH 5
    Goto See
  Death.Fire:
	ZSC1 G 0 A_NoBlocking
	ZSC1 G 0 A_SpawnItem("BurningBoi")
	TNT1 A -1
	Stop
  }
}