From b0d67843c43f50f36a92c4b8694b3df380ce50b1 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 11 Oct 2012 19:47:30 +0000 Subject: Moved handling of the physics reset for the Docked and Destroyed state from game tp core. --- src/game/base/game.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/game/base/game.cc') diff --git a/src/game/base/game.cc b/src/game/base/game.cc index f542676..8c82968 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -90,7 +90,9 @@ void Game::func_join(core::Player *player, std::string const &args) ship->set_dock(dock); player->set_view(dock); } - + + ship->reset(); + player->send("^BYou received " + aux::article(Default::shipmodel->name())); player->sound("game/buy-ship"); } @@ -344,10 +346,12 @@ void Game::func_give(core::Player *player, const std::string &args) // FIME move this into a method in the Ship class ship->set_zone(player->control()->zone()); ship->get_location().assign(player->control()->location()); - ship->set_state(player->control()->state()); + ship->set_dock(oldship->dock()); ship->get_axis().assign(player->control()->axis()); ship->set_thrust(player->control()->thrust()); + + ship->set_state(player->control()->state()); ship->reset(); //target_thrust is protected //ship->target_thrust = player->control()->target_thrust()); -- cgit v1.2.3