class HeatDetector expands Actor;

function PostBeginPlay()
{
local Actor A;

	SetTimer(0.2, True);

	ForEach AllActors(Class'Actor', A)
	{
		if (A.bStatic && (A.Tag == 'Cold' || A.Tag == 'Warm' || A.Tag == 'Hot'))
			Spawn(Class'HeatOv', A);
	}
}


function Timer()
{
local Actor A;
local HeatOv B;
local bool bHaveOwner;

	ForEach AllActors(Class'Actor', A)
	{
		if ((A.IsA('WreckedPiece') || A.IsA('Carcass') || A.IsA('Vehicle') || A.IsA('StrangeShell') || A.IsA('Cybot') ||
		A.IsA('WarShell') || A.IsA('DumbRocket') || A.IsA('TranslocatorTarget') || A.IsA('Pawn') || A.IsA('MegaTonOMFG')
		|| A.Tag == 'Cold' || A.Tag == 'Warm' || A.Tag == 'Hot') && !A.bStatic)
		{
			bHaveOwner = False;

			ForEach RadiusActors(Class'HeatOv', B, 256.0, A.Location)
			{
				if (B.Owner == A)
				{
					bHaveOwner = True;
					break;
				}
			}

			if (!bHaveOwner)
				Spawn(Class'HeatOv', A);
		}
	}
}


defaultproperties
{
	bHidden=True
	RemoteRole=ROLE_DumbProxy
	LifeSpan=0.000000
	bNetTemporary=False
}
