class HTControl extends Actor;

var _MMRPGPlayer paxx0r;
var int k;
var bool bWaiting;

Function Tick(float d)
{
	local HostageTaker H;

	Super.Tick(d);

	k += 1;

	if(k > 60)
	{
		k = 0;
		ForEach AllActors (class'HostageTaker', H)
		{
			return;
		}
		if(!bWaiting)
		{
			JustSpawn();
		}
	}
}

Function Lagga(_MMRPGPlayer pax)
{
	paxx0r = pax;
	bWaiting = True;
	SetTimer(2.0,False);
}

Function Timer()
{
	bWaiting = False;
	Hmm();
}

Function JustSpawn()
{
	local HTSpawn HTS;

	foreach Allactors(class'HTSpawn', HTS)
	{
		HTS.NailIt();
	}
}

Function Hmm()
{
	local HTSpawn HTS;
	local Teleporter T;

	bWaiting = False;

	foreach AllActors(class'Teleporter',T)
	{
		if(T.Tag == 'paxxOUT')
		{
			paxx0r.SetLocation(T.Location);
			paxx0r.SetPhysics(PHYS_Walking);
		}
	}
	
	foreach Allactors(class'HTSpawn', HTS)
	{
		HTS.NailIt();
	}
}

defaultproperties
{
     bHidden=True
     Physics=PHYS_None
     DrawType=DT_Sprite
     Texture=Texture'Engine.S_Inventory'
     DrawScale=1.000000
     CollisionRadius=0.000001
     CollisionHeight=0.000001
     Mass=0.000000
     Buoyancy=0.000000
     bBlockActors=False
     bBlockPlayers=False
     bCollideActors=False
     bCollideWorld=False
     bProjTarget=False
}
