class FireBallSmk expands TM_Smoke;

var() texture RandFlames[15], RandCFlames[15];
var() texture RandSmoke[8];

var byte FlameStg;
var int FlameRand;

simulated function Tick( float DeltaTime)
{
	ScaleGlow = LifeSpan * Default.ScaleGlow / Default.LifeSpan;

	if (FlameStg == 0 && LifeSpan < Default.LifeSpan*0.95)
	{
		Texture = RandCFlames[FlameRand];
		FlameStg = 1;
	}
	else if (FlameStg == 1 && LifeSpan < Default.LifeSpan*0.9)
	{
		Texture = RandSmoke[Rand(7)];
		FlameStg = 2;
		DrawScale = Default.DrawScale * 2;
	}
}

simulated function PostBeginPlay()
{
	FlameRand = Rand(14);
	Texture = RandFlames[FlameRand];

	Velocity = Vect(0,0,1)*RisingRate;
}

defaultproperties
{
	Texture=Smoke_01
	DrawScale=0.350000
	ScaleGlow=1.500000
	LifeSpan=1.500000
	RandFlames(0)=Flames_01
	RandFlames(1)=Flames_02
	RandFlames(2)=Flames_03
	RandFlames(3)=Flames_04
	RandFlames(4)=Flames_05
	RandFlames(5)=Flames_06
	RandFlames(6)=Flames_07
	RandFlames(7)=Flames_08
	RandFlames(8)=Flames_09
	RandFlames(9)=Flames_10
	RandFlames(10)=Flames_11
	RandFlames(11)=Flames_12
	RandFlames(12)=Flames_13
	RandFlames(13)=Flames_14
	RandFlames(14)=Flames_15
	RandCFlames(0)=CFlames_01
	RandCFlames(1)=CFlames_02
	RandCFlames(2)=CFlames_03
	RandCFlames(3)=CFlames_04
	RandCFlames(4)=CFlames_05
	RandCFlames(5)=CFlames_06
	RandCFlames(6)=CFlames_07
	RandCFlames(7)=CFlames_08
	RandCFlames(8)=CFlames_09
	RandCFlames(9)=CFlames_10
	RandCFlames(10)=CFlames_11
	RandCFlames(11)=CFlames_12
	RandCFlames(12)=CFlames_13
	RandCFlames(13)=CFlames_14
	RandCFlames(14)=CFlames_15
	RandSmoke(0)=Smoke_01
	RandSmoke(1)=Smoke_02
	RandSmoke(2)=Smoke_03
	RandSmoke(3)=Smoke_04
	RandSmoke(4)=Smoke_05
	RandSmoke(5)=Smoke_06
	RandSmoke(6)=Smoke_07
	RandSmoke(7)=Smoke_08
	RisingRate=50.000000
}