diff options
Diffstat (limited to 'src/core/player.cc')
-rw-r--r-- | src/core/player.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/player.cc b/src/core/player.cc index ad6641e..a642371 100644 --- a/src/core/player.cc +++ b/src/core/player.cc @@ -41,6 +41,7 @@ void Player::clear() player_control = 0; player_ping = 0; + player_level = 1; } @@ -207,7 +208,10 @@ void Player::serialize_server_update(std::ostream & os) const << view_id << " " << control_id << " " << mission_id << " " - << player_color << " "; + << player_color << " " + << player_credits << " " + << player_level << " " + << player_ping; } void Player::receive_server_update(std::istream &is) @@ -217,7 +221,7 @@ void Player::receive_server_update(std::istream &is) if (!player_id) { player_id = id; } else if (player_id != id) { - con_warn << "received inconsistent player update for player " << id << "\n"; + con_warn << "received inconsistent update for player " << id << "\n"; return; } @@ -254,6 +258,10 @@ void Player::receive_server_update(std::istream &is) player_mission_target = 0; } is >> player_color; + is >> player_credits; + is >> player_level; + + is >> player_ping; /* std::string n; |