// emitters
ACTOR splatEmitter_Lite
{
	radius 32
	height 32
	+CLIENTSIDEONLY
	States
	{
		Spawn:
			TNT1 A 0 
			TNT1 A 1 ACS_NamedExecuteAlways("ParticleCheck", 0, 0)
			TNT1 A 1
			TNT1 A 0 A_SpawnDebris("splatBlood_Eye")
			TNT1 A 0 A_SpawnDebris("splatBlood_Spray")
			TNT1 A 0 A_SpawnDebris("splatBlood_Rib")
			TNT1 A 0 A_SpawnDebris("splatBlood_Spine")
			Stop
		NoSpawn:
			TNT1 A 1 
			stop
	}
}

ACTOR MassiveGoreExplosion
{
	radius 32
	height 32
	States
	{
		Spawn:
			TNT1 A 0 
			TNT1 A 1 ACS_NamedExecuteAlways("ParticleCheck", 0, 0)
			TNT1 A 1
			TNT1 A 0 A_SpawnDebris("splatBlood_EyeGiant")
			TNT1 A 0 A_SpawnDebris("splatBlood_SprayGiant")
			TNT1 A 0 A_SpawnDebris("splatBlood_RibGiant")
			TNT1 A 0 A_SpawnDebris("splatBlood_SpineGiant")
			TNT1 A 0 A_SpawnDebris("splatBlood_EyeGiant")
			TNT1 A 0 A_SpawnDebris("splatBlood_SprayGiant")
			TNT1 A 0 A_SpawnDebris("splatBlood_RibGiant")
			TNT1 A 0 A_SpawnDebris("splatBlood_SpineGiant")
			Stop
		NoSpawn:
			TNT1 A 1 
			stop
	}
}


ACTOR splatEmitter_Bloody
{
	radius 32
	height 32
	States
	{
		Spawn:
			TNT1 A 0 A_SpawnDebris("splatBlood_Spray")
			Stop
	}
}

ACTOR SparksEmitter_Deploy
{
	radius 32
	height 32
	//+ClientsideOnly
	States
	{
		Spawn:
			TNT1 A 0 A_PlaySound("c/build")
			TNT1 A 1
			TNT1 A 1 ACS_NamedExecuteAlways("ParticleCheck", 0, 7)
			TNT1 A 1
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			TNT1 A 0 A_SpawnDebris("splatCFX")
			Stop
	}
}

ACTOR SparksEmitter_Building
{
	radius 32
	height 32
	States
	{
		Spawn:
			TNT1 A 1
			TNT1 A 1 ACS_NamedExecuteAlways("ParticleCheck", 0, 7)
			TNT1 A 1
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 10 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			NULL A 2 A_SpawnDebris("splatCFX2")
			NULL A 0 A_PlaySound("weapons/spark", CHAN_AUTO)
			Stop
		NoSpawn:
			TNT1 A 1
			Stop
	}
}


// particle actors

actor splatBlood_Eye
{
	health 2
	radius 1
	height 1
	scale 0.5
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		EYEB ABCD 3 A_CheckSight("Gone")
		EYEB ABCD 3 A_CheckSight("Gone")
		SPLT A 0 A_PlaySound("splatBlood")
		SPLT ABCDEF 3 A_CheckSight("Gone")
		stop
		Gone:
		TNT1 A 1
		Stop
	}
}

actor splatBlood_EyeGiant
{
	health 2
	radius 1
	height 1
	scale 3
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		EYEB ABCD 3 A_CheckSight("Gone")
		EYEB ABCD 3 A_CheckSight("Gone")
		SPLT A 0 A_PlaySound("splatBlood")
		SPLT ABCDEF 3 A_CheckSight("Gone")
		stop
		Gone:
		TNT1 A 1
		Stop
	}
}

actor splatBlood_Spine
{
	health 2
	radius 1
	height 1
	scale 0.5
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		GORE ABCD 3 A_CheckSight("Gone")
		GORE ABCD 3 A_CheckSight("Gone")
		TNT1 A 0 A_PlaySound("splatBlood")
		GORE E 50 A_CheckSight("Gone")
        stop
		//Fade:
		//GORE E 2 A_FadeOut(0.1)
		//loop
		Gone:
		TNT1 A 1
		Stop
	}
}

actor splatBlood_SpineGiant : splatBlood_Spine
{
	scale 5.0
}

actor splatBlood_Rib
{
	health 3
	radius 1
	height 1
	scale 0.5
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		GUTS ABCD 2  A_CheckSight("Gone")
		GUTS ABCD 2  A_CheckSight("Gone")
		GUTS ABCD 2  A_CheckSight("Gone")
		TNT1 A 0  A_PlaySound("splatBlood")
		GUTS E 50 A_CheckSight("Gone")
        stop
		//Fade:
		//GUTS E 2 A_FadeOut(0.1)
		//loop
		Gone:
		TNT1 A 1
		Stop
	}
}

actor splatBlood_RibGiant
{
	health 3
	radius 1
	height 1
	scale 4
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		GUTS ABCD 2 A_CheckSight("Gone")
		GUTS ABCD 2 A_CheckSight("Gone")
		GUTS ABCD 2 A_CheckSight("Gone")
		TNT1 A 0 A_PlaySound("splatBlood")
		GUTS E 50 A_CheckSight("Gone")
                stop
		//Fade:
		//GUTS E 2 A_FadeOut(0.1)
		//loop
		Gone:
			TNT1 A 1
		Stop
	}
}

actor splatCFX
{
	health 2
	radius 1
	height 1
	scale 0.3
	renderstyle add
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		BLUP ABAB 3 A_PlaySound("c/build")
		BLUP ABAB 3
		FadeOut:
		BLUP AB 3 A_FadeOut(0.1)
		Loop
	}
}

actor splatCFX2
{
	health 2
	radius 1
	height 1
	scale 0.6
	renderstyle add
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		IFOG D 3 nodelay a_fadein(0.7)
		TNT1 A 0 A_CheckRange(512, "Gone")
		TNT1 A 0 A_CheckFloor("Gone")
		IFOG D 3 a_fadeout(0.7)
		TNT1 A 0 A_CheckRange(512, "Gone")
		TNT1 A 0 A_CheckFloor("Gone")
		loop
		Gone:
			TNT1 A 1
		stop
	}
}

actor splatBlood_Spray
{
	health 20
	radius 1
	height 1
	scale 1
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		SPLT A 0 A_PlaySound("splatBlood")
		SPLT ABCDEF 3 A_CheckSight("Gone")
		stop
		
		Gone:
		TNT1 A 1
		Stop
	}
}

actor splatBlood_SprayGiant
{
	health 20
	radius 1
	height 1
	scale 5
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		BLUD AB 1 A_CheckSight("Gone")
		SPLT A 0 A_PlaySound("splatBlood")
		SPLT ABCDEF 3 A_CheckSight("Gone")
		stop
		
		Gone:
		TNT1 A 1
		Stop
	}
}


ACTOR splatBlood replaces Blood
{
	SpawnID 130
	Mass 5
	+NOBLOCKMAP
	+NOTELEPORT
	+CLIENTSIDEONLY
	States
	{
		Spawn:
		BLUD CBA 8 //A_SpawnDebris("splatBlood_Eye")
		Stop
		Spray:
		SPRY ABCDEF 3
		SPRY G 2
		Stop
	}
}

// casings
ACTOR splatShellCasing
{
	Height 12
	Radius 9
	Speed 4
	Scale 0.25
	PROJECTILE
	+DOOMBOUNCE
	- NOGRAVITY
	+CLIENTSIDEONLY
	//SeeSound "splatShell"
	States
	{
		Spawn:
		CASE A 0 
		CASE A 1 ACS_NamedExecuteAlways("ParticleCheck", 0 , 4)
		CASE A 1 A_PlaySound("splatShell")
		LoopMe:
		CASE ACBHEGFD 1
		Loop
		Death:
		CASE A 0 A_Jump(32,8)
		CASE A 0 A_Jump(37,8)
		CASE A 0 A_Jump(43,8)
		CASE A 0 A_Jump(51,8)
		CASE A 0 A_Jump(64,8)
		CASE A 0 A_Jump(85,8)
		CASE A 0 A_Jump(128,8)
		CASE A 350
		Stop
		CASE B 350
		Stop
		CASE C 350
		Stop
		CASE D 350
		Stop
		CASE E 350
		Stop
		CASE F 350
		Stop
		CASE G 350
		Stop
		CASE H 350
		Stop

		NoSpawn:
		TNT1 A 1
		Stop
	}
}
ACTOR splatBulletCasing
{
	Height 12
	Radius 9
	Speed 4
	Scale 0.1
	PROJECTILE
	+DOOMBOUNCE
	- NOGRAVITY
	+CLIENTSIDEONLY
	//SeeSound "splatBulletCasing"
	States
	{
		Spawn:
		BULC A 0 
		BULC A 1 ACS_NamedExecuteAlways("ParticleCheck", 0 , 4)
		BULC A 1 A_PlaySound("splatBulletCasing")
		LoopMe:
		BULC ACBHEGFD 1
		Loop
		Death:
		BULC A 0 A_Jump(32,8)
		BULC A 0 A_Jump(37,8)
		BULC A 0 A_Jump(43,8)
		BULC A 0 A_Jump(51,8)
		BULC A 0 A_Jump(64,8)
		BULC A 0 A_Jump(85,8)
		BULC A 0 A_Jump(128,8)
		BULC A 350
		Stop
		BULC B 350
		Stop
		BULC C 350
		Stop
		BULC D 350
		Stop
		BULC E 350
		Stop
		BULC F 350
		Stop
		BULC G 350
		Stop
		BULC H 350
		Stop

		NoSpawn:
		TNT1 A 1
		Stop
	}
}

ACTOR splatBulletCasing_Lite : splatBulletCasing
{
	States
	{
		Spawn:
		BULC A 0 
		BULC A 1 ACS_NamedExecuteAlways("ParticleCheck", 0 , 4)
		BULC A 1 A_PlaySound("splatBulletCasing")
		LoopMe:
		BULC ACBHEGFD 1
		Loop
		Death:
		BULC A 0 A_Jump(32,8)
		BULC A 0 A_Jump(37,8)
		BULC A 0 A_Jump(43,8)
		BULC A 0 A_Jump(51,8)
		BULC A 0 A_Jump(64,8)
		BULC A 0 A_Jump(85,8)
		BULC A 0 A_Jump(128,8)
		BULC A 35
		Stop
		BULC B 35
		Stop
		BULC C 35
		Stop
		BULC D 35
		Stop
		BULC E 35
		Stop
		BULC F 35
		Stop
		BULC G 35
		Stop
		BULC H 35
		Stop

		NoSpawn:
		TNT1 A 1
		Stop
	}
}
