diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-21 19:06:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-21 19:06:15 +0000 |
commit | 8aa04fc836116a58f8ffd1e0c3539b9ea8a94ddf (patch) | |
tree | bb933edb3919ed67d05b098a6b97a73f01746762 /src/game/game.cc | |
parent | 41ad1e4c9e2a70d0a8811f4b035f0d3018045e61 (diff) |
dedicated server, entity transfer
Diffstat (limited to 'src/game/game.cc')
-rw-r--r-- | src/game/game.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/game.cc b/src/game/game.cc index 311a696..a76d5e7 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -30,6 +30,8 @@ void func_join(core::Player *player, std::string const &args) std::string message(player->name()); message.append(" joins the game."); core::server()->broadcast(message); + + player->player_dirty = true; } /// a player joins the spectators @@ -44,9 +46,11 @@ void func_spectate(core::Player *player, std::string const &args) if (player->control) { // player has only ship for now - core::Entity::remove(player->control->id()); + player->control->die(); player->control = 0; } + + player->player_dirty = true; } /*----- Game ------------------------------------------------------ */ @@ -136,7 +140,7 @@ void Game::player_disconnect(core::Player *player) { if (player->control) { // player has only one ship for now - core::Entity::remove(player->control->id()); + player->control->die(); player->control = 0; } } |