actor SmokeBase
{
	Radius 1
	Height 1
	RenderStyle Translucent
	MaxStepHeight 0
	+NOBLOCKMAP
	+DROPOFF
	+THRUACTORS
	-SOLID
	+NOGRAVITY
	+FORCEXYBILLBOARD
	+CANNOTPUSH
	+DONTSPLASH
	+SLIDESONWALLS
	+WINDTHRUST
	+NOBLOCKMONST
	var int user_scale;
	states
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_Jump(256, "Initialize")
			stop
		Initialize:
		InitializeEnd:
			TNT1 A 0 A_SetUserVar("user_scale", frandom(1 / 1.5, 1.5) * 65536)
			TNT1 A 0 A_SetScale(scaleX * (user_scale / 65536.0), scaleY * (user_scale / 65536.0))
			TNT1 A 0 A_JumpIf(waterlevel > 1, "Bubble")
			TNT1 A 0 A_Jump(256, "Color")
			stop
		Color:
			SMKE A 0
		ColorEnd:
			"####" A 0 A_Jump(255,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)
			"####" A -1
			stop
			"####" B -1
			stop
			"####" C -1
			stop
			"####" D -1
			stop
			"####" E -1
			stop
			"####" F -1
			stop
			"####" G -1
			stop
			"####" H -1
			stop
			"####" I -1
			stop
			"####" J -1
			stop
			"####" K -1
			stop
			"####" L -1
			stop
			"####" M -1
			stop
			"####" N -1
			stop
			"####" O -1
			stop
			"####" P -1
			stop
			"####" Q -1
			stop
			"####" R -1
			stop
			"####" S -1
			stop
			"####" T -1
			stop
			"####" U -1
			stop
			"####" V -1
			stop
			"####" W -1
			stop
			"####" X -1
			stop
		Bubble:
			TNT1 A 0 A_SpawnItemEx("WhiteBubble", 0, 0, 0, velx, vely, velz, 0, SXF_ABSOLUTEMOMENTUM | SXF_TRANSFERSCALE)
			stop
	}
}

actor BallExplodeSmoke : SmokeBase
{
	Scale 0.1
	Alpha 0.1
	states
	{
		Initialize:
			TNT1 A 0 ACS_NamedExecuteAlways("SmokeInitialize", 0, 35, 2.5 * 65536, 0.9 * 65536)
			goto InitializeEnd
	}
}

actor BalloonDeathSmoke : SmokeBase
{
	Scale 0.05
	Alpha 0.15
	states
	{
		Initialize:
			TNT1 A 0 ACS_NamedExecuteAlways("SmokeInitialize", 0, 140, 2.5 * 65536, 0.99 * 65536)
			goto InitializeEnd
	}
}

actor BalloonExplodeSmoke : SmokeBase
{
	Alpha 0.2
	Scale 0.3
	states
	{
		Initialize:
			TNT1 A 0 ACS_NamedExecuteAlways("SmokeInitialize", 0, 140, 2 * 65536, 0.96 * 65536)
			goto InitializeEnd
	}
}
