home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / Engine / Classes / Vehicle.uc < prev    next >
Text File  |  2003-06-23  |  921b  |  43 lines

  1. class Vehicle extends Pawn
  2.     native
  3.     abstract;
  4.     
  5. var() byte Team;
  6. var bool bDefensive; // should be used by defenders
  7.  
  8. // generic controls (set by controller, used by concrete derived classes)
  9. var (KVehicle) float    Steering; // between -1 and 1
  10. var (KVehicle) float    Throttle; // between -1 and 1
  11.  
  12.  
  13. cpptext
  14. {
  15.     virtual UBOOL moveToward(const FVector &Dest, AActor *GoalActor);
  16.     virtual void rotateToward(AActor *Focus, FVector FocalPoint);
  17.     virtual int pointReachable(FVector aPoint, int bKnowVisible=0);
  18.     virtual int actorReachable(AActor *Other, UBOOL bKnowVisible=0, UBOOL bNoAnchorCheck=0);
  19. }
  20.  
  21. function PostBeginPlay()
  22. {
  23.     Super.PostBeginPlay();
  24.     
  25.     if ( !bDeleteMe )
  26.         Level.Game.RegisterVehicle(self);
  27. }
  28.  
  29. // AI code
  30. function bool Occupied()
  31. {
  32.     return ( Controller != None );
  33. }
  34.  
  35. function Actor GetBestEntry(Pawn P)
  36. {
  37.     return self;
  38. }
  39.  
  40. defaultproperties
  41. {
  42.     Team=255
  43. }