diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-11 19:27:00 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-11 19:27:00 +0000 |
commit | d9ec7389df61ed28a788b0d19b6e12d64dff65ba (patch) | |
tree | a31e0c381c6db3c7824057a4f779048f135c1d40 /src | |
parent | e6ed410de0f3e647d1bb71d9a8eff7e877cc69bf (diff) |
Show current autopilot target as player mission target on the HUD.
Diffstat (limited to 'src')
-rw-r--r-- | src/game/base/ship.cc | 7 |
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) |