Skip to content

Commit

Permalink
Merge pull request #2442 from lioncash/netplay
Browse files Browse the repository at this point in the history
NetPlayClient: Fix erroneous shifts for reconstructing system time.
  • Loading branch information
lioncash committed May 24, 2015
2 parents fcf5e0f + 1d2b297 commit c6088cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Source/Core/Core/NetPlayClient.cpp
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/NetPlayServer.cpp
Expand Up @@ -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);

Expand Down

0 comments on commit c6088cd

Please sign in to comment.