Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-10-20 14:44:12 +0000
committerStijn Buys <ingar@osirion.org>2010-10-20 14:44:12 +0000
commit21e6267e3f998a467ca3b5ec225e6d03653aed97 (patch)
treec52570e35ee8b91c271da9e6588a2d7b527ce3e0 /src/game/base/ship.h
parenta76489275b7c66ab0264e8e29c4d4d08c22e3e16 (diff)
advanced ship physics specifications, specs game function
Diffstat (limited to 'src/game/base/ship.h')
-rw-r--r--src/game/base/ship.h56
1 files changed, 54 insertions, 2 deletions
diff --git a/src/game/base/ship.h b/src/game/base/ship.h
index 2c1bc2c..c8d478c 100644
--- a/src/game/base/ship.h
+++ b/src/game/base/ship.h
@@ -23,6 +23,31 @@ public:
Ship(core::Player *owner, ShipModel *shipmodel);
~Ship();
+ /// shipmodel
+ inline const ShipModel *shipmodel() const {
+ return ship_shipmodel;
+ }
+
+ /// impulse drive force
+ inline const float impulse_force() const {
+ return ship_impulse_force;
+ }
+
+ /// thruster force
+ inline const float thrust_force() const {
+ return ship_thrust_force;
+ }
+
+ /// strafe force
+ inline const float strafe_force() const {
+ return ship_strafe_force;
+ }
+
+ /// torque force
+ inline const float torque_force() const {
+ return ship_torque_force;
+ }
+
/// physices frame
virtual void action (btScalar seconds);
@@ -36,7 +61,29 @@ public:
inline bool jumpdrive() const {
return ship_jumpdrive;
}
-
+
+ /// set impulse drive force
+ inline void set_impulse_force(const float impulse) {
+ ship_impulse_force = impulse;
+
+ }
+
+ /// set thruster force
+ inline void set_thrust_force(const float thrust) {
+ ship_thrust_force = thrust;
+ }
+
+ /// set strafe force
+ inline void set_strafe_force(const float strafe) {
+ ship_strafe_force = strafe;
+ }
+
+ /// set torque force
+ inline void set_torque_force(const float torque) {
+ ship_torque_force = torque;
+ }
+
+
/// Initiate jump, departing from a jump point
/** Initiates a jump even if the ship has no jumpdrive
*/
@@ -54,6 +101,7 @@ public:
/// toggle jump drive activation
void func_jump(std::string const & args);
+
virtual void dock(Entity *entity);
private:
@@ -73,8 +121,12 @@ private:
float ship_impulsedrive_timer;
-
JumpPoint *ship_jumpdepart;
+
+ float ship_impulse_force;
+ float ship_thrust_force;
+ float ship_strafe_force;
+ float ship_torque_force;
};
}