Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2014-12-24 23:35:58 +0000
committerStijn Buys <ingar@osirion.org>2014-12-24 23:35:58 +0000
commitc015b23be7f853c0e3028d9becf85e74ae647ff6 (patch)
treec576f82413b856f111d34a1c11e2b6ea088942ed /src/game
parentf83b25da506d7cf9c60e6eebbdd91532c9962783 (diff)
Don't set thruster to 0 while docking.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/base/ship.cc11
1 files 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;
+ }
}
}
}