… | |
… | |
50 | |
50 | |
51 | #define MAX_QUEUE_DEPTH 50 |
51 | #define MAX_QUEUE_DEPTH 50 |
52 | #define MAX_QUEUE_BACKLOG 3. |
52 | #define MAX_QUEUE_BACKLOG 3. |
53 | |
53 | |
54 | // disconnect a socket after this many seconds without an ack |
54 | // disconnect a socket after this many seconds without an ack |
55 | #define SOCKET_TIMEOUT 8. |
55 | #define SOCKET_TIMEOUT 16. |
56 | |
56 | |
57 | void |
57 | void |
58 | client::reset_state () |
58 | client::reset_state () |
59 | { |
59 | { |
60 | if (!pl) |
60 | if (!pl) |
… | |
… | |
120 | /* Update the players stats once per tick. More efficient than |
120 | /* Update the players stats once per tick. More efficient than |
121 | * sending them whenever they change, and probably just as useful |
121 | * sending them whenever they change, and probably just as useful |
122 | */ |
122 | */ |
123 | esrv_update_stats (pl); |
123 | esrv_update_stats (pl); |
124 | |
124 | |
|
|
125 | #if 0 |
125 | if (last_weight != -1 && last_weight != WEIGHT (pl->ob)) |
126 | if (last_weight != -1 && last_weight != pl->ob->client_weight ()) |
126 | { |
127 | { |
127 | esrv_update_item (UPD_WEIGHT, pl->ob, pl->ob); |
128 | esrv_update_item (UPD_WEIGHT, pl->ob, pl->ob); |
128 | if (last_weight != WEIGHT (pl->ob)) |
129 | if (last_weight != pl->ob->client_weight ()) |
129 | LOG (llevError, "esrv_update_item(UPD_WEIGHT) did not set player weight: is %lu, should be %lu\n", |
130 | LOG (llevError, "esrv_update_item(UPD_WEIGHT) did not set player weight: is %lu, should be %lu\n", |
130 | (unsigned long) last_weight, WEIGHT (pl->ob)); |
131 | (unsigned long) last_weight, pl->ob->client_weight ()); |
131 | } |
132 | } |
|
|
133 | #endif |
132 | |
134 | |
133 | draw_client_map (pl); |
135 | draw_client_map (pl); |
134 | |
136 | |
135 | if (update_look) |
137 | if (update_look) |
136 | esrv_draw_look (pl); |
138 | esrv_draw_look (pl); |