diff options
author | Stijn Buys <ingar@osirion.org> | 2013-10-20 14:36:45 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-10-20 14:36:45 +0000 |
commit | b277c65615482f17c966771341ae6b7a89cc9568 (patch) | |
tree | d5138749901e816ac1b197279b51e7ac23e15b82 /src/game/base/ship.cc | |
parent | 6704be2d5550f091c18c4cc50ef6d28bf55a31a4 (diff) |
Make wingmen follow you through jumpgates.
Diffstat (limited to 'src/game/base/ship.cc')
-rw-r--r-- | src/game/base/ship.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index 75656dc..c017ce1 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -693,10 +693,13 @@ void Ship::frame(const unsigned long elapsed) set_zone(ship_jumpdepart->target()->zone()); - if (owner() && owner()->view() && (owner()->view()->zone() != ship_jumpdepart->target()->zone())) - owner()->set_view(0); + if (owner()) { + if (owner()->view() && (owner()->view()->zone() != ship_jumpdepart->target()->zone())) { + owner()->set_view(0); + } - owner()->send("^BJumping to the " + ship_jumpdepart->target()->zone()->name()); + owner()->send("^BJumping to the " + ship_jumpdepart->target()->zone()->name()); + } } else { set_state(core::Entity::Normal); } @@ -1155,6 +1158,7 @@ void Ship::frame_autopilot_dock(const unsigned long elapsed, core::Entity *targe // jumpgates have their own docking function JumpGate *jumpgate = static_cast<JumpGate *>(target); jumpgate->func_dock(this); + unset_autopilot_flag(AutoPilotDock); return; |