Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UnrealShare.UJumpDest


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
// Written by .:..:
// The "destination" for the JumpPad
Class UJumpDest extends LiftCenter;

var UJumpPad Start;
var UJumpPadEnd End;

function PostBeginPlay()
{
	local byte i;
	local Actor St,En;
	local int RF,D;

	For( i=0; i<16; i++ )
	{
		if ( Paths[i]==-1 )
			Continue;
		describeSpec(Paths[i],St,En,RF,D);
		if ( UJumpPad(En)!=None )
		{
			Start = UJumpPad(En);
			Paths[i] = -1;
		}
		else if ( UJumpPadEnd(En)!=None )
			End = UJumpPadEnd(En);
	}
	if ( Start!=None && End!=None )
		bSpecialCost = True;
}
function Actor SpecialHandling(Pawn Other)
{
	if ( Start==None || End==None )
		Return Self;
	if ( VSize(Other.Location-Start.Location)<VSize(Other.Location-End.Location) )
		Return End; // Make bots move directly to end point.
	else Return Self; // Allow bots "jump down" this way if no other path.
}
function int SpecialCost( Pawn Seeker )
{
	if ( Start==None || End==None )
		Return 9999999;
	if ( VSize(Seeker.Location-Start.Location)<VSize(Seeker.Location-End.Location) )
		Return 0;
	else Return 9999999;
}

// Accept only from JumpDest.
function bool CanBindWith( NavigationPoint Start )
{
	return (UJumpDest(Start)!=None);
}

// Only bind with other pathnodes.
function PathBuildingType EdPathBuildExec( NavigationPoint End, out int ForcedDistance )
{
	if( LiftCenter(End)==None )
		return Super.EdPathBuildExec(End,ForcedDistance);
}

defaultproperties
{
				ExtraCost=20
				bStatic=True
				RemoteRole=ROLE_None
				Texture=Texture'UnrealShare.S_SpawnP'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:28.000 - Creation time: zo 11-11-2012 21:14:21.272 - Created with UnCodeX