NetPlayClient: Fix reassembling of system time from packets
The shifts need to be swapped to correctly reassemble a 64-bit integer.
This commit is contained in:
parent
8f12cc5bc3
commit
6dd10033d3
|
@ -395,7 +395,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
|
||||||
u32 x, y;
|
u32 x, y;
|
||||||
packet >> x;
|
packet >> x;
|
||||||
packet >> y;
|
packet >> y;
|
||||||
g_netplay_initial_gctime = x | ((u64)y >> 32);
|
g_netplay_initial_gctime = x | ((u64)y << 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dialog->OnMsgStartGame();
|
m_dialog->OnMsgStartGame();
|
||||||
|
|
|
@ -657,7 +657,7 @@ bool NetPlayServer::StartGame()
|
||||||
*spac << m_settings.m_EXIDevice[0];
|
*spac << m_settings.m_EXIDevice[0];
|
||||||
*spac << m_settings.m_EXIDevice[1];
|
*spac << m_settings.m_EXIDevice[1];
|
||||||
*spac << (u32)g_netplay_initial_gctime;
|
*spac << (u32)g_netplay_initial_gctime;
|
||||||
*spac << (u32)g_netplay_initial_gctime << 32;
|
*spac << (u32)(g_netplay_initial_gctime >> 32);
|
||||||
|
|
||||||
SendAsyncToClients(spac);
|
SendAsyncToClients(spac);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue