| 8219 | } |
| 8220 | |
| 8221 | void MultiDoPong(uint8_t *data) { |
| 8222 | uint8_t outdata[MAX_GAME_DATA_SIZE]; |
| 8223 | int outcount = 0; |
| 8224 | int count = 0; |
| 8225 | int size_offset; |
| 8226 | |
| 8227 | SKIP_HEADER(data, &count); |
| 8228 | uint8_t slot = MultiGetByte(data, &count); |
| 8229 | float pingtime = MultiGetFloat(data, &count); |
| 8230 | NetPlayers[slot].ping_time = timer_GetTime() - pingtime; |
| 8231 | |
| 8232 | // If we are the server and this is a client server game, send the lag info to other clients |
| 8233 | if ((Netgame.local_role == LR_SERVER) && (!(Netgame.flags & NF_PEER_PEER))) { |
| 8234 | size_offset = START_DATA(MP_PLAYER_LAG_INFO, outdata, &outcount); |
| 8235 | MultiAddByte(slot, outdata, &outcount); |
| 8236 | MultiAddFloat(NetPlayers[slot].ping_time, outdata, &outcount); |
| 8237 | END_DATA(outcount, outdata, size_offset); |
| 8238 | MultiSendToAllExcept(Player_num, outdata, outcount, 0); |
| 8239 | } |
| 8240 | } |
| 8241 | |
| 8242 | void MultiDoLagInfo(uint8_t *data) { |
| 8243 | int count = 0; |
no test coverage detected