Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pilot.h
Go to the documentation of this file.
1 #include "config.h"
2 #include "gnuhash.h"
3 #include <vector>
4 class Animation;
5 class Unit;
6 
7 class Pilot
8 {
9  unsigned char gender; //which sound should play
10  float reaction_time;
11  float rank;
12  int faction; //duplicate data...any way round this??
13 public:
14  explicit Pilot( int faction );
15  virtual ~Pilot() {}
16  void SetComm( Unit *comm_unit ); //so we can specialize base sort of people
17  Animation * getCommFace( Unit *parent, float moon, unsigned char &gender );
19  {
20  return reaction_time;
21  }
22  unsigned char getGender()
23  {
24  return gender;
25  }
26  float getRank()
27  {
28  return rank;
29  } //man it's rank in here
30  typedef vsUMap< const void*, float >relationmap; //non dereferencable Unit to float
32  std::vector< Animation* > *comm_face;
33  float getAnger( const Unit *parent, const Unit *un ) const;
34  std::vector< Animation* > * getCommFaces( unsigned char &sex )
35  {
36  sex = gender;
37  return comm_face;
38  }
39  float GetEffectiveRelationship( const Unit *parent, const Unit *target ) const;
40  float adjustSpecificRelationship( Unit *parent, void *aggressor, float value, int guessedFaction /*pass in neutral otherwise*/ );
41  void DoHit( Unit *parent, void *aggressor, int guessedFaction /*pass in neutral otherwise*/ );
42 };
43