Debug: Detect which frame's state first diverged after a desync

This commit is contained in:
Jonathan G Rennison
2022-11-13 01:07:53 +00:00
parent 7582993d00
commit 5e00d535bc
10 changed files with 97 additions and 0 deletions

View File

@@ -101,6 +101,16 @@ extern uint8 _network_reconnect;
extern CompanyMask _network_company_passworded;
/* Sync debugging */
struct NetworkSyncRecord {
uint32 frame;
uint32 seed_1;
uint64 state_checksum;
};
extern std::vector<NetworkSyncRecord> _network_client_sync_records;
extern std::unique_ptr<std::array<NetworkSyncRecord, 1024>> _network_server_sync_records;
extern uint32 _network_server_sync_records_next;
void NetworkQueryServer(const std::string &connection_string);
void GetBindAddresses(NetworkAddressList *addresses, uint16 port);