NetPlayServer: Make g_initial_netplay_rtc a member variable of NetPlayClient

Behaviorally, this belongs within the netplay client. The server will
always transmit a known RTC value, so it doesn't even need a global for
this. Given the client receives the packet containing said RTC value, we can
store it as a member variable and provide an accessor for reading that
value.

This removes another global variable within the netplay code.
This commit is contained in:
Lioncash 2018-07-14 18:55:17 -04:00
commit ac1b48497e
5 changed files with 24 additions and 11 deletions

View file

@ -102,6 +102,8 @@ public:
bool WiimoteUpdate(int _number, u8* data, const u8 size, u8 reporting_mode);
bool GetNetPads(int pad_nb, GCPadStatus* pad_status);
u64 GetInitialRTCValue() const;
void OnTraversalStateChanged() override;
void OnConnectReady(ENetAddress addr) override;
void OnConnectFailed(u8 reason) override;
@ -203,6 +205,7 @@ private:
u8 m_sync_save_data_count = 0;
u8 m_sync_save_data_success_count = 0;
u64 m_initial_rtc = 0;
u32 m_timebase_frame = 0;
};