Network: Include frame in client join info

This commit is contained in:
Jonathan G Rennison 2023-08-28 19:57:58 +01:00
parent 82c9d18b5b
commit d6ff538a46
2 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@ struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_p
Date join_date; ///< Gamedate the client has joined Date join_date; ///< Gamedate the client has joined
DateFract join_date_fract; DateFract join_date_fract;
uint8 join_tick_skip_counter; uint8 join_tick_skip_counter;
uint32 join_frame;
/** /**
* Create a new client. * Create a new client.

View File

@ -1021,6 +1021,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(Packet *p)
ci->join_date = _date; ci->join_date = _date;
ci->join_date_fract = _date_fract; ci->join_date_fract = _date_fract;
ci->join_tick_skip_counter = _tick_skip_counter; ci->join_tick_skip_counter = _tick_skip_counter;
ci->join_frame = _frame_counter;
ci->client_name = client_name; ci->client_name = client_name;
ci->client_playas = playas; ci->client_playas = playas;
DEBUG(desync, 1, "client: date{%08x; %02x; %02x}; client: %02x; company: %02x", _date, _date_fract, _tick_skip_counter, (int)ci->index, (int)ci->client_playas); DEBUG(desync, 1, "client: date{%08x; %02x; %02x}; client: %02x; company: %02x", _date, _date_fract, _tick_skip_counter, (int)ci->index, (int)ci->client_playas);
@ -2467,8 +2468,8 @@ char *NetworkServerDumpClients(char *buffer, const char *last)
if (ci->join_date != 0) { if (ci->join_date != 0) {
YearMonthDay ymd; YearMonthDay ymd;
ConvertDateToYMD(ci->join_date, &ymd); ConvertDateToYMD(ci->join_date, &ymd);
buffer += seprintf(buffer, last, ", joined: %4i-%02i-%02i, %2i, %3i", buffer += seprintf(buffer, last, ", joined: %4i-%02i-%02i, %i, %i, frame: %08X",
ymd.year, ymd.month + 1, ymd.day, ci->join_date_fract, ci->join_tick_skip_counter); ymd.year, ymd.month + 1, ymd.day, ci->join_date_fract, ci->join_tick_skip_counter, ci->join_frame);
} }
buffer += seprintf(buffer, last, "\n"); buffer += seprintf(buffer, last, "\n");
} }