diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-10 01:48:41 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-10 01:48:41 +0000 |
commit | 9dc3cc532820349a0f0e087afb60132927fd3411 (patch) | |
tree | bfdc9d515df65cde07f9fe217e7c87ed1556801f /src/game/base/ship.h | |
parent | d4f8d1c8fde01a58bc757b588c9850e69225bc24 (diff) |
Corrected a bug which prevented the patrol profile from being set correctly,
corrected a bug where 'give ship' would forget the last spawn,
have NPC ships fire on nearby enemies,
made patrol leaders hunt nearby enemies.
Diffstat (limited to 'src/game/base/ship.h')
-rw-r--r-- | src/game/base/ship.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/base/ship.h b/src/game/base/ship.h index e8a6505..d627295 100644 --- a/src/game/base/ship.h +++ b/src/game/base/ship.h @@ -20,6 +20,7 @@ const float MIN_DELTA = 0.000001f; // planet docking distance const float PLANET_SAFE_DISTANCE = 50.0f; +const float COMBAT_DISTANCE = 100.0f; /** @@ -28,7 +29,7 @@ const float PLANET_SAFE_DISTANCE = 50.0f; class Ship : public core::EntityControlable { public: - enum AutoPilotFlags { AutoPilotDisabled = 0, AutoPilotEnabled = 1, AutoPilotDock = 2, AutoPilotFormation = 4 }; + enum AutoPilotFlags { AutoPilotDisabled = 0, AutoPilotEnabled = 1, AutoPilotDock = 2, AutoPilotFormation = 4, AutoPilotCombat = 8 }; Ship(core::Player *owner, const ShipModel *shipmodel); ~Ship(); @@ -234,7 +235,12 @@ protected: void frame_autopilot_goto(const unsigned long elapsed, core::Entity *target); /** - * @brief autopilot goto target + * @brief autopilot combat + * */ + void frame_autopilot_combat(const unsigned long elapsed, core::Entity *target); + + /** + * @brief autopilo dock target * */ void frame_autopilot_dock(const unsigned long elapsed, core::Entity *target); |