Merge pull request #2442 from lioncash/netplay

NetPlayClient: Fix erroneous shifts for reconstructing system time.
This commit is contained in:
Lioncash 2015-05-23 23:22:11 -04:00
commit c6088cdf31
2 changed files with 5 additions and 5 deletions

View File

@ -392,10 +392,10 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
packet >> tmp;
g_NetPlaySettings.m_EXIDevice[1] = (TEXIDevices)tmp;
u32 x, y;
packet >> x;
packet >> y;
g_netplay_initial_gctime = x | ((u64)y >> 32);
u32 time_low, time_high;
packet >> time_low;
packet >> time_high;
g_netplay_initial_gctime = time_low | ((u64)time_high << 32);
}
m_dialog->OnMsgStartGame();

View File

@ -657,7 +657,7 @@ bool NetPlayServer::StartGame()
*spac << m_settings.m_EXIDevice[0];
*spac << m_settings.m_EXIDevice[1];
*spac << (u32)g_netplay_initial_gctime;
*spac << (u32)g_netplay_initial_gctime << 32;
*spac << (u32)(g_netplay_initial_gctime >> 32);
SendAsyncToClients(spac);