1 #include "serverobject.h" 2 #include "matrix.h" 3 4 5 class ServerShip:public ServerObject { 6 7 public: 8 float InvRotationMatrix[3][3]; 9 struct PlayerActionStruct Action; 10 struct Point Acceleration; 11 float xAcceleration, yAcceleration, zAcceleration; 12 float ShotPos; 13 int Score; 14 int Lives; 15 int Shield; 16 int Armor; 17 int ShakeTime; 18 char PlayerName[MAX_PLAYERNAME_LENGTH]; 19 int Bot; 20 int NextBotFireTime; 21 int BotShieldOnTime; 22 int WarpTime; 23 int Warps; 24 int Nukes; 25 26 ServerShip(struct Point Pos, struct Point Vel, struct Point Rot, int Type, float Size, float Mass, int playernum, char *playername, int bot=0); 27 28 ~ServerShip(); 29 30 void InitPlayer(); 31 32 void UpdateRotation(); 33 34 void UpdateVelocity(); 35 36 void Accelerate(int type, float Accelerate); 37 38 void CalcAcceleration(); 39 40 void die(); 41 42 void live(); 43 44 void FireShot(); 45 46 void FireNuke(); 47 48 void DoUpdates(); 49 50 int TakeDamage(int DamageAmount); 51 52 void CalcBotRotation(); 53 54 int FindClosestShip(float *Distance); 55 56 int FindClosestObject(float *Distance); 57 58 void CalcShipRelPosition(ServerObject *Obj, struct Point *relPosition); 59 60 void IncreaseArmor(int ArmorAmount); 61 62 void IncreaseShield(int ShieldAmount); 63 64 void DecreaseShield(int ShieldAmount); 65 66 void WarpShip(); 67 }; 68 69 extern ServerShip *ServerShips[MAX_PLAYERS]; 70