class BallFlames expands Flames;

auto state Flying
{

    function ProcessTouch (Actor Other, Vector HitLocation)
    {
	local ObjectsFlames F;
	local bool bThere;
	local IceOv io;

	ForEach RadiusActors(Class'IceOv', io, 8.0, Other.Location)
		io.Destroy();

        if ( !Other.IsA('Projectile') && Other!=Level)
	{
            Explode(HitLocation,Normal(HitLocation-Other.Location));

		if (Other.DrawScale < 1.25 && Other.DrawScale > 0.75 && Other.Tag != 'NoBurn' && Class'NWMutator'.default.EnableFTrackerFlames)
		{
			ForEach RadiusActors(Class'ObjectsFlames', F, 8.0, Other.Location)
			{
				if (F.Owner == Other)
				{
					bThere=True;
					break;
				}
			}

			if (!bThere)
			{
				F = Spawn(Class'ObjectsFlames', Other,, Other.Location);
				F.HealthGiver = HealthGiver;
				F.MoreDamage = MoreDamage;
			}
		}
	}
    }

}


simulated function Tick( float DeltaTime)
{
	ScaleGlow = LifeSpan * 8;
	DrawScale = (Default.LifeSpan - LifeSpan) * 8 * ScalingSmk;

	if (Class'NWMutator'.default.bFlamesFDetail)
	{
		if (FlameStg == 0 && LifeSpan < Default.LifeSpan*0.7)
		{
			Texture = RandFlames[FlameRand];
			FlameStg = 1;
		}
		else if (FlameStg == 1 && LifeSpan < Default.LifeSpan*0.5)
		{
			Texture = RandCFlames[FlameRand];
			FlameStg = 2;
		}
		else if (FlameStg == 2 && LifeSpan < Default.LifeSpan*0.35)
		{
			Texture = RandSmoke[Rand(7)];
			FlameStg = 3;
			ScalingSmk = 2;
		}
	}
}


defaultproperties
{
	LifeSpan=0.300000
	CollisionHeight=16.000000
	CollisionRadius=16.000000
}

