diff options
author | Stijn Buys <ingar@osirion.org> | 2014-12-22 16:57:20 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2014-12-22 16:57:20 +0000 |
commit | e7061d6fed8bdfc1828315eb8745cd919cb96bbc (patch) | |
tree | de614d556c748542ef169f1e4c295a832efdaae9 /src/game/base/game.cc | |
parent | 871552eab28d07c3aaf0cabb5fb167c0eb365bdf (diff) |
Prevent wingmen from getting destroyed when you buy a new ship or use the 'give ship' engine command.
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r-- | src/game/base/game.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc index 62ceef8..2ec3c62 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -686,7 +686,7 @@ void Game::func_wingmen(core::Player *player, const std::string &args) return; } - assert(player->control()->moduletype() == ship_enttype); + assert(player->control()->moduletype() == ship_enttype); Ship * ship = static_cast<Ship *>(player->control()); std::istringstream is(args); @@ -714,6 +714,8 @@ void Game::func_wingmen(core::Player *player, const std::string &args) for (int count = 0; count < amount; ++count) { NPC *npc = NPC::add_wingman(ship); if (npc) { + npc->set_commander(player); + if (faction) { faction->apply(npc); player->send(faction->name() + " wingman standing by!"); |