From c015b23be7f853c0e3028d9becf85e74ae647ff6 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 24 Dec 2014 23:35:58 +0000 Subject: Don't set thruster to 0 while docking. --- src/game/base/ship.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index 9b78dfa..0a64c0e 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -576,7 +576,7 @@ void Ship::launch() ship_autopilot_flags = AutoPilotDisabled; ship_autopilot_target = 0; - + reset(); } @@ -1389,8 +1389,13 @@ void Ship::frame_autopilot_goto(const unsigned long elapsed, core::Entity *targe target_thrust = math::max(0.1f, (distance - r ) / (3.0f * r)); } else { - target_thrust = 0.0f; - // TODO autolevel + if (target->has_flag(core::Entity::Dockable) && autopilot_target() && has_autopilot_flag(AutoPilotDock)) + { + target_thrust = 0.1f; + } else + { + target_thrust = 0.0f; + } } } } -- cgit v1.2.3