Include last sync frame in desync crash log
This commit is contained in:
@@ -76,6 +76,9 @@ uint32 _sync_seed_2; ///< Second part of the seed.
|
||||
#endif
|
||||
uint64 _sync_state_checksum; ///< State checksum to compare during sync checks.
|
||||
uint32 _sync_frame; ///< The frame to perform the sync check.
|
||||
Date _last_sync_date; ///< The game date of the last successfully received sync frame
|
||||
DateFract _last_sync_date_fract; ///< "
|
||||
uint8 _last_sync_tick_skip_counter; ///< "
|
||||
bool _network_first_time; ///< Whether we have finished joining or not.
|
||||
bool _network_udp_server; ///< Is the UDP server started?
|
||||
uint16 _network_udp_broadcast; ///< Timeout for the UDP broadcasts.
|
||||
@@ -582,6 +585,10 @@ static void NetworkInitialize(bool close_admins = true)
|
||||
_network_first_time = true;
|
||||
|
||||
_network_reconnect = 0;
|
||||
|
||||
_last_sync_date = 0;
|
||||
_last_sync_date_fract = 0;
|
||||
_last_sync_tick_skip_counter = 0;
|
||||
}
|
||||
|
||||
/** Non blocking connection create to query servers */
|
||||
|
@@ -333,6 +333,9 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res)
|
||||
my_client->ClientError(NETWORK_RECV_STATUS_DESYNC);
|
||||
return false;
|
||||
}
|
||||
_last_sync_date = _date;
|
||||
_last_sync_date_fract = _date_fract;
|
||||
_last_sync_tick_skip_counter = _tick_skip_counter;
|
||||
|
||||
/* If this is the first time we have a sync-frame, we
|
||||
* need to let the server know that we are ready and at the same
|
||||
|
@@ -118,6 +118,9 @@ extern uint32 _sync_seed_2;
|
||||
#endif
|
||||
extern uint64 _sync_state_checksum;
|
||||
extern uint32 _sync_frame;
|
||||
extern Date _last_sync_date;
|
||||
extern DateFract _last_sync_date_fract;
|
||||
extern uint8 _last_sync_tick_skip_counter;
|
||||
extern bool _network_first_time;
|
||||
/* Vars needed for the join-GUI */
|
||||
extern NetworkJoinStatus _network_join_status;
|
||||
|
Reference in New Issue
Block a user