class PlayersIn extends Teleporter;


function Touch( actor Other )
{
}

function GoLagshotGo(actor Other)
{
	local Teleporter Dest;
	local int i;
	local Actor A;
	local Inventory Inv;


	if( Other.bCanTeleport && Other.PreTeleport(Self)==false )
	{
		if( (InStr( URL, "/" ) >= 0) || (InStr( URL, "#" ) >= 0) )
		{
			// Teleport to a level on the net.
			if( (Role == ROLE_Authority) && (PlayerPawn(Other) != None) )
				Level.Game.SendPlayer(PlayerPawn(Other), URL);
		}
		else
		{
			// Teleport to a random teleporter in this local level, if more than one pick random.

			foreach AllActors( class 'Teleporter', Dest )
				if( string(Dest.tag)~=URL && Dest!=Self )
					i++;
			i = rand(i);
			foreach AllActors( class 'Teleporter', Dest )
				if( string(Dest.tag)~=URL && Dest!=Self && i-- == 0 )
					break;
			if( Dest != None )
			{
				// Teleport the actor into the other teleporter.
				if ( Other.IsA('Pawn') )
					PlayTeleportEffect( Pawn(Other), false);
				Dest.Accept( Other, self );
				if( (Event != '') && (Other.IsA('Pawn')) )
					foreach AllActors( class 'Actor', A, Event )
						A.Trigger( Other, Other.Instigator );
			}
			else if ( Role == ROLE_Authority )
				Pawn(Other).ClientMessage( "Teleport destination for "$self$" not found!" );
		}
	}
}

	

defaultproperties
{
     bChangesYaw=True
     bEnabled=False
     RemoteRole=ROLE_SimulatedProxy
     bDirectional=True
     Texture=Texture'Engine.S_Teleport'
     SoundVolume=128
     CollisionRadius=120.000000
     CollisionHeight=40.000000
     bCollideActors=True
}
