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

Engine.NavigationPoint


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
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
//=============================================================================
// NavigationPoint.
//=============================================================================
class NavigationPoint extends Actor
			native;

#exec Texture Import File=Textures\S_Pickup.pcx Name=S_Pickup Mips=Off Flags=2

//------------------------------------------------------------------------------
// NavigationPoint variables
var() name ownerTeam;	//creature clan owning this area (area visible from this point)
var() name ProscribedPaths[4];	// list of names or tags of NavigationPoints which should never be connected from this path
var() name ForcedPaths[4];	// list of names or tags of NavigationPoints which should always be connected from this path
var bool taken; //set when a creature is occupying this spot
var int upstreamPaths[16];
var int Paths[16]; //index of reachspecs (used by C++ Navigation code)
var int PrunedPaths[16];
var NavigationPoint VisNoReachPaths[16]; //paths that are visible but not directly reachable
var int visitedWeight;
var actor RouteCache;
var const int bestPathWeight;
var NavigationPoint nextNavigationPoint;
var const NavigationPoint nextOrdered;
var const NavigationPoint prevOrdered;
var const NavigationPoint startPath;
var const NavigationPoint previousPath;
var int cost; //added cost to visit this pathnode
var() int ExtraCost;
var() bool bPlayerOnly;	//only players should use this path

var bool bEndPoint; //used by C++ navigation code
var bool bEndPointOnly; //only used as an endpoint in routing network
var bool bSpecialCost;	//if true, navigation code will call SpecialCost function for this navigation point
var() bool bOneWayPath;	//reachspecs from this path only in the direction the path is facing (180 degrees)
var bool bAutoBuilt;	// placed during execution of "PATHS BUILD"
var() bool bNoStrafeTo; // Pawn should never use serpentine movement upon entering this path.
var() byte PathDescription; // pointer to path description in zoneinfo LocationStrings array
var transient pointer EditorData;

var() int ForcedPathSize; // When path is forced, use this as path size.
var() float MaxPathDistance; // Maximum path distance (used in editor while binding paths).

enum PathBuildingType
{
	PATHING_Normal, // No special actions taken, simply check path size normally.
	PATHING_Proscribe, // Never bind to this pathnode.
	PATHING_Force, // Force to bind to this pathnode.
	PATHING_Special, // Special path, same as forced path but requires AI special flag.
};

native(519) final function describeSpec(int iSpec, out Actor Start, out Actor End, out int ReachFlags, out int Distance);
event int SpecialCost(Pawn Seeker);

// New U227 functions:

/* Reach flags description:
1 = Walking required.
2 = Flying required.
4 = Swimming required.
8 = Jumping required.
16 = Door way.
32 = Special path (teleporter, LiftCenter/Exit).
64 = Players only path. */

/* Very fast:
Generate a new ReachSpec, example:
APathN.Paths[4] = Class'USAPI'.Static.GenReachSpec(APathN,EndPoint,VSize(APathN.Location-EndPoint.Location),50,70,1,False); */
native(1712) final function int GenReachSpec( Actor Start, Actor End, int Dist, int ColR, int ColH, int RchFlgs, bool bPruned );

/* Very fast:
Edit an excisting reachspec */
native(1713) final function bool EditReach( int Idx, optional Actor Start, optional Actor End, optional int Dist, optional int ColR,
		optional int ColH, optional int RchFlgs, optional bool bPruned );

/* Very fast:
Remove an existing reachspec.
WARNING: If you remove for example, reachspec #25, all remaining reachspecs after will go -1; #26 becomes #25, #27 becomes #26 etc. It could break
down entire map navigation for AI! */
native(1714) final function bool RemoveReachSpec( int Idx );


// Accept an actor that has teleported in.
// used for random spawning and initial placement of creatures
event bool Accept( actor Incoming )
{
	// Move the actor here.
	taken = Incoming.SetLocation( Location + vect (0,0,20));
	if (taken)
	{
		Incoming.Velocity = vect(0,0,0);
		Incoming.SetRotation(Rotation);
	}
	// Play teleport-in effect.
	PlayTeleportEffect(Incoming, true);
	return taken;
}

function PlayTeleportEffect(actor Incoming, bool bOut)
{
	Level.Game.PlayTeleportEffect(Incoming, bOut, false);
}

// Executed in editor while building paths (this is overrided by Forced/ProscribedPaths list).
event PathBuildingType EdPathBuildExec( NavigationPoint End, out int ForcedDistance )
{
	if( End.CanBindWith(Self) )
		return PATHING_Normal;
	return PATHING_Proscribe;
}
function bool CanBindWith( NavigationPoint Start )
{
	return true;
}

defaultproperties
{
				upstreamPaths(0)=-1
				upstreamPaths(1)=-1
				upstreamPaths(2)=-1
				upstreamPaths(3)=-1
				upstreamPaths(4)=-1
				upstreamPaths(5)=-1
				upstreamPaths(6)=-1
				upstreamPaths(7)=-1
				upstreamPaths(8)=-1
				upstreamPaths(9)=-1
				upstreamPaths(10)=-1
				upstreamPaths(11)=-1
				upstreamPaths(12)=-1
				upstreamPaths(13)=-1
				upstreamPaths(14)=-1
				upstreamPaths(15)=-1
				Paths(0)=-1
				Paths(1)=-1
				Paths(2)=-1
				Paths(3)=-1
				Paths(4)=-1
				Paths(5)=-1
				Paths(6)=-1
				Paths(7)=-1
				Paths(8)=-1
				Paths(9)=-1
				Paths(10)=-1
				Paths(11)=-1
				Paths(12)=-1
				Paths(13)=-1
				Paths(14)=-1
				Paths(15)=-1
				PrunedPaths(0)=-1
				PrunedPaths(1)=-1
				PrunedPaths(2)=-1
				PrunedPaths(3)=-1
				PrunedPaths(4)=-1
				PrunedPaths(5)=-1
				PrunedPaths(6)=-1
				PrunedPaths(7)=-1
				PrunedPaths(8)=-1
				PrunedPaths(9)=-1
				PrunedPaths(10)=-1
				PrunedPaths(11)=-1
				PrunedPaths(12)=-1
				PrunedPaths(13)=-1
				PrunedPaths(14)=-1
				PrunedPaths(15)=-1
				PathDescription=12
				ForcedPathSize=150
				MaxPathDistance=1000.000000
				bStatic=True
				bHidden=True
				bCollideWhenPlacing=True
				SoundVolume=0
				CollisionRadius=46.000000
				CollisionHeight=50.000000
}

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