ACTOR FX_Spark
{
	+CLIENTSIDEONLY
	+MISSILE
	-NOGRAVITY
	-LOWGRAVITY
	+FORCEXYBILLBOARD
	+THRUACTORS
	-SOLID
	Speed 3
	Scale 0.02
	Renderstyle Add
	Alpha 1.0
	Gravity 0.3
	States
	{
	Spawn:
		SPRK A 0
		TNT1 A 0 A_Jump(256,"SetFrame")
		Goto SetFrame
	SetFrame:
		SPRK A 0
		Goto Handle
	Handle:
		"####" "#" 0
		"####" "#####" 1 bright A_ScaleVelocity(0.95)
		"####" "##########" 1 bright A_FadeOut(0.1)
		Stop
	}
}

ACTOR CasingSpark : FX_Spark
{
	States
	{
		SetFrame:
			SPRK A 0
			Goto Super::Handle
	}
}

ACTOR TeleportSpark : FX_Spark
{
	Scale 0.05
	States
	{
		SetFrame:
			SPRK B 0
			SPRK B 0 A_Jump(256,"Scale1","Scale2","Scale3")
			Goto Scale1
		Scale1:
			SPRK B 0 A_SetScale(0.04)
			Goto Super::Handle
		Scale2:
			SPRK B 0 A_SetScale(0.07)
			Goto Super::Handle
		Scale3:
			SPRK B 0 A_SetScale(0.10)
			Goto Super::Handle
	}
}

ACTOR TeleportSparkerTest : ZTFX replaces TeleportFog
{
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 ACS_NamedExecuteAlways("TeleportCheck",0)
		TNT1 A 1
		Stop
	}
}
		
ACTOR TeleportSparker : ZTFX
{
	RenderStyle None
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("teleport/perform")
		TNT1 AAAA 0 A_SpawnItemEx("TeleportSteam",random(-8,8),random(-8,8),0,random(-2,2),random(-2,2),0)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("TeleportSpark",random(-24,24),random(-24,24),random(-12,12),0,0,random(4,8))
		PUFF ABCD 4
		Stop
	}
}