From a1eb1b4dc4d81df724ee43fc4e895dd22e81760f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 9 Nov 2008 21:45:18 +0000 Subject: working jumpgates --- src/game/base/ship.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/game/base/ship.h') 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; }; } -- cgit v1.2.3