From 259c57929d4dfe6cf3ffc307996763e953d9d374 Mon Sep 17 00:00:00 2001 From: wraitii Date: Fri, 27 Nov 2020 15:41:24 +0000 Subject: [PATCH] Fix MP OOS when rejoining on turn 0 Reported by: elexis Fixes #5185 Differential Revision: https://code.wildfiregames.com/D3068 This was SVN commit r24275. --- source/network/NetServerTurnManager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/network/NetServerTurnManager.cpp b/source/network/NetServerTurnManager.cpp index 1ecdad522c..21108d5dd9 100644 --- a/source/network/NetServerTurnManager.cpp +++ b/source/network/NetServerTurnManager.cpp @@ -35,10 +35,11 @@ CNetServerTurnManager::CNetServerTurnManager(CNetServerWorker& server) : m_NetServer(server), m_ReadyTurn(1), m_TurnLength(DEFAULT_TURN_LENGTH_MP), m_HasSyncError(false) { - // The first turn we will actually execute is number 2, - // so store dummy values into the saved lengths list - m_SavedTurnLengths.push_back(0); + // Turn 0 is not actually executed, store a dummy value. m_SavedTurnLengths.push_back(0); + // Turn 1 is special: all clients run it without waiting on a server command batch. + // Because of this, it is always run with the default MP turn length. + m_SavedTurnLengths.push_back(m_TurnLength); } void CNetServerTurnManager::NotifyFinishedClientCommands(CNetServerSession& session, u32 turn)