From d9ec7389df61ed28a788b0d19b6e12d64dff65ba Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 11 Nov 2013 19:27:00 +0000 Subject: Show current autopilot target as player mission target on the HUD. --- src/game/base/ship.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3