Ticket #3309: t3309_cap_expected_simTime_v3_for_singleplayer_and_replays.patch
File t3309_cap_expected_simTime_v3_for_singleplayer_and_replays.patch, 943 bytes (added by , 9 years ago) |
---|
-
source/network/NetTurnManager.cpp
bool CNetTurnManager::WillUpdate(float s 102 102 103 103 bool CNetTurnManager::Update(float simFrameLength, size_t maxTurns) 104 104 { 105 105 m_DeltaSimTime += simFrameLength; 106 106 107 // If the game runs slower than the game speed dictates, m_DeltaSimTime increases progressively. 108 // The engine will try to fast forward accordingly to catch up. TODO: We fix it for singleplayer 109 // and replays until we are certain that it works for multiplayer too. 110 if (!g_NetClient && !g_NetServer) 111 m_DeltaSimTime = std::min(m_DeltaSimTime, simFrameLength); 112 107 113 // If we haven't reached the next turn yet, do nothing 108 114 if (m_DeltaSimTime < 0) 109 115 return false; 110 116 111 117 NETTURN_LOG((L"Update current=%d ready=%d\n", m_CurrentTurn, m_ReadyTurn));