SFVehicle.SFVehiclePathNode

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
//=============================================================================
// Spatial Fear
// Name: SFVehiclePathNode
// Description: Defines where a SFVehicle can and cannot travel.  Also used by SFVehiclePathMover to define its path.
//
// Author: Gert Jen Peltenburg
//=============================================================================
class SFVehiclePathNode expands Actor;

var (SpatialFear) int sequence;          // Note that one sequence 0 is required, all pathnodes with the same tag, must have unique sequence
var (SpatialFear) bool circularpath;
var SFVehiclePathNode Next;
var SFVehiclePathNode Prev;

function BeginPlay()
{
 local SFVehiclePathNode node;
 local int i;
 local SFVehiclePathNode tempnode[250]; // this is temporary storage - currently a max. of 250 nodes
 
 if(sequence==0) { // first node in a path will initialize the chain 
  foreach allactors(class'SFVehiclePathNode',node,tag) {
   if(node.sequence<arraycount(tempnode))
    tempnode[node.sequence]=node;
  }
  node=None;
  for(i=0;i<arraycount(tempnode);i++) {
   if(tempnode[i]!=None) {
    if(node!=None) {
     tempnode[i].Prev=node;
     node.Next=tempnode[i];
    }
    node=tempnode[i];
   }
  }
  if(circularpath && node!=None && node!=self) {
   node.Next=self;
   Prev=node;
  }
 }
}

defaultproperties
{
     bHidden=True
     bAlwaysRelevant=True
     bDirectional=True
     Texture=Texture'UnrealShare.Icons.ArrowDL'
     bMovable=False
     CollisionRadius=100.000000
     CollisionHeight=150.000000
     bCollideActors=True
     bCollideWorld=True
}

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX