Main Page | Modules | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members

autopilot.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * $Id: autopilot.h,v 1.5 2003/07/16 11:42:14 schou Exp $
00003  * Author: Jakob Schou Jensen <schou@sourceforge.net>
00004  * Licence: GPL
00005  *
00006  * Description: 
00007  *  Vehicle auto pilot
00008  *
00009  ****************************************************************************/
00010 
00016 #ifndef AUTOPILOT_H
00017 #define AUTOPILOT_H
00018 
00019 #include "vehicle.h"
00020 #include "animation.h"
00021 
00022 #define APS_PASSIVE 0
00023 #define APS_ATTACKING 1
00024 #define APS_RETREATING 2
00025 #define APS_GETEPSILON 3 
00026 
00027 class AutoPilot : public TimedAnimation, public VehicleControl {
00028   v3f epsilonPos;
00029   int enabled;
00030   float vehicleStuckTime;
00031   int state;
00032 
00033  public:
00034   void update(double);
00035   void setTarget(v3f tp){ epsilonPos = tp; }
00036   void disable();
00037   void enable();
00038   int isEnabled(){ return enabled; }
00039   void reckless(int s) { if(enabled) turbo=s; }
00040   AutoPilot();
00041 };
00042 
00043 #endif
00044 

Generated on Mon Jul 21 10:44:47 2003 for Rover by doxygen 1.3.2