////////////////////////////////
// PLAYER 1 - DOOMGUY       ////
////////////////////////////////
ACTOR Doomguy : PlayerPawn
{
	Speed 1
	Health 115
	Radius 16
	Height 56
	Mass 100
	Stamina 15
	-TELESTOMP
	DamageFactor "NewRevenantRockets", 0.4
	Player.JumpZ 9.0
	Player.DisplayName "Doomguy"
	PLayer.SoundClass "doomguy"
	Player.CrouchSprite "PLYC"
	Player.StartItem "Beretta"
	Player.StartItem "DoomguyFists"
	Player.StartItem "HandGrenadeAmmo", 1
	Player.StartItem "Clip1", 100
	Player.ColorRange 112, 127
	RenderStyle "Normal"
	States
	{
	Spawn:
		PLAY A 0
		"####" "#" 0
	Goto Idling		
		
	Idling:
		"####" E 2 A_JumpIf((MomX*MomX)+(MomY*MomY) > 16,"Walking")
	Loop
		
	See:
	
	Walking:
		PLAY A 0 A_SpawnItemEx("FootStep", -1, -1, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_CLIENTSIDE)
		PLAY AAAAAABBBBBB 1
		PLAY A 0 A_JumpIf((MomX*MomX)+(MomY*MomY) <= 16,"Idling")
		PLAY A 0 A_SpawnItemEx("FootStepB", -1, 1, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_CLIENTSIDE)
		PLAY CCCCCCDDDDDD 1
		PLAY A 0 A_JumpIf((MomX*MomX)+(MomY*MomY) <= 16,"Idling")
	Loop
		
	Missile:
		PLAY EF 4
	Goto Idling
		
	Melee:
		PLAY A 0
	Goto Idling
		
	Pain:
		PLAY A 1 A_Pain
	Goto Spawn
		
	Death:
		PLAY GH 3
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_Playsound ("DOOMDETH")
		PLAY J 3 A_NoBlocking
		PLAY KLM 3
		PLAY N -1
	Stop
	
	XDeath:
		PLAY G 2
		TNT1 A 0 A_GiveToTarget("GoFatality", 1)
		TNT1 A 0 A_GiveToTarget("PVPFatality", 1)
		TNT1 A 0 ThrustThingZ(0,90,0,1)
		TNT1 A 0 A_CustomMissile("DoomguyHeadIsNowFlyingInTheAir", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("XPlayerDoomguyLegDeath", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("IntestinalGutsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("RibsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("OrgansFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("TorsoFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunkSuper", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_Playsound ("BIGDETH", 1, 128, FALSE)
		TNT1 A 0 A_NoBlocking
		TNT1 A -1
		Stop
	FatalityPVP:
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 ACS_Execute(477, 0, 0, 0, 0)
		TNT1 A 0 A_SetInvulnerable
	
	Crush:
		TNT1 A 0 A_SkullPop
		TNT1 A 0 A_CustomMissile("DoomguyHeadIsNowFlyingInTheAir", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("XPlayerDoomguyLegDeath", 100,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("IntestinalGutsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("RibsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("OrgansFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("TorsoFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunkSuper", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_Playsound ("BIGDETH", 1, 128, FALSE)
		TNT1 A 0 A_NoBlocking
		TNT1 A -1
	Stop
	}
}

////////////////////////////////
// PLAYER FOOTSTEPS           //
////////////////////////////////
/////////////////////////////////////////////
ACTOR FootStep
{
	Radius 1
	Height 1
	+NOCLIP
	+CLIENTSIDEONLY
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_PlaySoundEx("STEPA", "Weapon")
	Stop
	}
}

/////////////////////////////////////////////
ACTOR FootStepB : FootStep
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_PlaySoundEx("STEPB", "Weapon")
	Stop
	}
}

///////////////////////////////////////
ACTOR DoomguyHeadIsNowFlyingInTheAir
{
	Radius 8
	Height 8
	Mass 1
	Speed 24
	BounceType Doom
	+NOBLOCKMAP
	+MISSILE
	+SKYEXPLODE
	+NOTELEPORT
	+BOUNCEONWALLS
	+BOUNCEONCEILINGS
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE4"
	Decal BloodSuperSplatter
	States
{
	Spawn:
		DEAD ABCD 3 A_CustomMissile ("FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Death:
		TNT1 A 0 A_SpawnItem("BloodSpot",0,0,0,1)
		DEAD A -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}

///////////////////////////////////////
ACTOR XPlayerDoomguyLegDeath
{
	Radius 8
	Height 8
	Mass 1
	Speed 24
	BounceType Doom
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+BOUNCEONWALLS
	+SKYEXPLODE
	+BOUNCEONCEILINGS
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE5"
	Decal BloodSuperSplatter
	States
{
	Spawn:
		DLEZ ABCD 3
		TNT1 A 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
	Loop
	
	Death:
		TNT1 A 0 A_SpawnItem("BloodSpot",0,0,0,1)
		DLEZ E -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}