//=============================================================================
// This path type traces thru movers
//
// For testing purposes, do not modify or redistribute
// Have suggestions? Contact me.
// caco_fff@hotmail.com - Higor at UT99.org
//=============================================================================
class Botz_NavigDoorSpecial expands Botz_NavigDoor;

#exec TEXTURE IMPORT NAME=BWP_Door2 FILE=..\CompileData\BWP_Door2.bmp FLAGS=2

var Botz_NavigDoor OtherSide;

event FinishedPathing()
{
	local Actor A;
	local int uReach;

	ForEach ConnectedDests( Self, A, uReach)
	{
		if ( A.IsA('Botz_NavigDoor') )
		{
			if ( (OtherSide == none) || (VSize(OtherSide.Location - Location) > VSize(A.Location-Location) ) )
				OtherSide = Botz_NavigDoor(A);
		}
	}

	if ( OtherSide != none )
		SetTimer(1.5, true);
}

event Timer()
{
	if ( PathVisible( self, otherSide) )
		ExtraCost = 0;
	else
		ExtraCost = 25000;
}

defaultproperties
{
	FriendlyName="Special Door Node"
	MaxDistance=800
	Texture=Texture'BWP_Door'
}