diff options
Diffstat (limited to 'src/game/base/ship.h')
-rw-r--r-- | src/game/base/ship.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/game/base/ship.h b/src/game/base/ship.h index d3c8bbf..bed3d1e 100644 --- a/src/game/base/ship.h +++ b/src/game/base/ship.h @@ -13,7 +13,7 @@ #include "base/jumppoint.h" #include "math/vector3f.h" -namespace base { +namespace game { /// A ship in the game, controled by a player class Ship : public core::EntityControlable @@ -28,16 +28,23 @@ public: /// true if the ship is equiped with a jumpdrive inline bool jumpdrive() const { return ship_jumpdrive; } - /// toggle jump drive activation - void jump(std::string const & args); - - /// toggle impulse drive activation - void impulse(); + /// Initiate jump, departing from a jump point + /** Initiates a jump even if the ship has no jumpdrive + */ + void initiate_jump(JumpPoint *depart); /// void reset drive controls void reset(); + /// toggle impulse drive activation + void func_impulse(); + + /// toggle jump drive activation + void func_jump(std::string const & args); + private: + JumpPoint *find_closest_jumppoint(); + ShipModel *ship_shipmodel; float current_target_direction; @@ -51,7 +58,8 @@ private: float ship_impulsedrive_timer; - JumpPoint * find_closest_jumppoint(); + + JumpPoint *ship_jumpdepart; }; } |