Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-11 19:27:00 +0000
committerStijn Buys <ingar@osirion.org>2013-11-11 19:27:00 +0000
commitd9ec7389df61ed28a788b0d19b6e12d64dff65ba (patch)
treea31e0c381c6db3c7824057a4f779048f135c1d40 /src/game/base
parente6ed410de0f3e647d1bb71d9a8eff7e877cc69bf (diff)
Show current autopilot target as player mission target on the HUD.
Diffstat (limited to 'src/game/base')
-rw-r--r--src/game/base/ship.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index bcaae46..7c9de1f 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -495,7 +495,12 @@ void Ship::set_zone(core::Zone *zone)
void Ship::set_autopilot_target(core::Entity *target)
{
- ship_autopilot_target = target;
+ if (ship_autopilot_target != target) {
+ if (owner()) {
+ owner()->set_mission_target(target);
+ }
+ ship_autopilot_target = target;
+ }
}
void Ship::set_dock(core::Entity *dock)