ACTOR ZDusk_PlayerPawn : DuskDude
{
  Speed 1
  Health 100
  Radius 16
  Height 56
  Mass 100
  PainChance 255

//	Gravity 0.825
//	Player.JumpZ 7.45


  Player.DisplayName "Dusk Movement"
  Player.CrouchSprite "PLYC"
  Player.soundclass Dooskdood
  Player.StartItem "dusk_pistol"
  Player.StartItem "dusk_sickles"
  Player.StartItem "Clip", 50
  Player.StartItem "Dusk_Wep2Ammo", 38

  Player.WeaponSlot 1, dusk_sickles
  Player.WeaponSlot 2, dusk_pistol, dusk_pistol2
  Player.WeaponSlot 3, dusk_winchester, dusk_winchester2
  Player.WeaponSlot 4, dusk_supershotgun
  Player.WeaponSlot 5, dusk_assrifle
  Player.WeaponSlot 6, dusk_sniper
  Player.WeaponSlot 7, dusk_crossbow
  Player.WeaponSlot 8, dusk_mortar
  Player.WeaponSlot 9, dusk_riveter
  Player.WeaponSlot 0, dusk_cigar

  Player.StartItem "Action_AltFire", 1
  Player.StartItem "Action_AltFireCancel", 1

  Player.ColorRange 112, 127
  Player.ColorSet 0, "Green",         0x70, 0x7F,  0x72
  Player.ColorSet 1, "Gray",          0x60, 0x6F,  0x62 // Called "Indigo" originally so as to have a unique initial
  Player.ColorSet 2, "Brown",         0x40, 0x4F,  0x42
  Player.ColorSet 3, "Red",           0x20, 0x2F,  0x22
  // Doom Legacy additions
  Player.ColorSet 4, "Light Gray",    0x58, 0x67,  0x5A
  Player.ColorSet 5, "Light Brown",   0x38, 0x47,  0x3A
  Player.ColorSet 6, "Light Red",     0xB0, 0xBF,  0xB2
  Player.ColorSet 7, "Light Blue",    0xC0, 0xCF,  0xC2

  States
  {
  Spawn:
    PLAY A -1
    Loop
  See:
    PLAY ABCD 4 
    Loop
  Missile:
    PLAY E 12
    Goto Spawn
  Melee:
    PLAY F 6 BRIGHT
    Goto Missile
  Pain:
    PLAY G 0 A_GiveInventory("Player_GotInjured",1)//prevents player to get untouchable award if hurt.
    PLAY G 4 A_GiveInventory("Player_GotInjured",1)
    PLAY G 4 A_Pain
    Goto Spawn

  Pain.RivetSP:
			TNT1 A 0 A_ChangeVelocity(-cos(-pitch)*0,0,sin(pitch)*4.5,CVF_RELATIVE) //this recoil applies always
			TNT1 A 0 A_CheckFloor(2)
			TNT1 A 0 A_ChangeVelocity(-cos(-pitch)*0,0,sin(pitch)*4.5,CVF_RELATIVE) //only when in air			
    PLAY G 0 A_GiveInventory("Player_GotInjured",1)//prevents player to get untouchable award if hurt.
    PLAY G 4 A_GiveInventory("Player_GotInjured",1)
    PLAY G 4 A_Pain
    Goto Spawn

  Death:
    PLAY H 10
    PLAY I 10 A_PlayerScream
    PLAY J 10 A_NoBlocking
    PLAY KLM 10
    PLAY N -1
    Stop

  XDeath:
TNT1 A 0 A_PlaySound("monster/explodegore")
		TNT1 A 0 A_NoBlocking

        TNT1 A 1 A_SpawnItemEx("Dusk_GenericMonsterGore",0,0,0,0,0,0,0,32)
		TNT1 A -1
		Stop
  }
}