Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-10-11 19:47:30 +0000
committerStijn Buys <ingar@osirion.org>2012-10-11 19:47:30 +0000
commitb0d67843c43f50f36a92c4b8694b3df380ce50b1 (patch)
treebce9b7e4c30862a411909a96b2d7b298c9e0999f /src/game/base/game.cc
parent529e80912f5a62eba69190aadf026a6cf1e27ea4 (diff)
Moved handling of the physics reset for the Docked and Destroyed state from game tp core.
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r--src/game/base/game.cc8
1 files changed, 6 insertions, 2 deletions
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());