diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-08 20:47:56 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-08 20:47:56 +0000 |
| commit | 3544db49270f6d99c8b2126f294d38267e2899cb (patch) | |
| tree | 02a17b114cacf8ce634d65c6f53f3b6537ee06ce /src/game/server/player.cpp | |
| parent | 1d094181ed06edd6f9d851f5d802bc9d03b6c352 (diff) | |
| download | zcatch-3544db49270f6d99c8b2126f294d38267e2899cb.tar.gz zcatch-3544db49270f6d99c8b2126f294d38267e2899cb.zip | |
fixed #490 (insert the player info in the sv_setinfo message into the snapshot instead)
Diffstat (limited to 'src/game/server/player.cpp')
| -rw-r--r-- | src/game/server/player.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 45d56388..b2f72d0e 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -62,6 +62,13 @@ void PLAYER::tick() void PLAYER::snap(int snaping_client) { + NETOBJ_CLIENT_INFO *client_info = (NETOBJ_CLIENT_INFO *)snap_new_item(NETOBJTYPE_CLIENT_INFO, client_id, sizeof(NETOBJ_CLIENT_INFO)); + str_to_ints(&client_info->name0, 6, server_clientname(client_id)); + str_to_ints(&client_info->skin0, 6, skin_name); + client_info->use_custom_color = use_custom_color; + client_info->color_body = color_body; + client_info->color_feet = color_feet; + NETOBJ_PLAYER_INFO *info = (NETOBJ_PLAYER_INFO *)snap_new_item(NETOBJTYPE_PLAYER_INFO, client_id, sizeof(NETOBJ_PLAYER_INFO)); info->latency = latency.min; @@ -151,13 +158,6 @@ void PLAYER::set_team(int new_team) dbg_msg("game", "team_join player='%d:%s' team=%d", client_id, server_clientname(client_id), team); game.controller->on_player_info_change(game.players[client_id]); - - // send all info to this client - for(int i = 0; i < MAX_CLIENTS; i++) - { - if(game.players[i]) - game.send_info(i, -1); - } } void PLAYER::try_respawn() |