From 538a25ae6c9a9d6b6fbba557475ee0921168dfe8 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Tue, 18 Mar 2014 20:37:10 +1300 Subject: [PATCH] Fix replays for network games. Fixes #4866. --- OpenRA.Game/Network/ReplayConnection.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Network/ReplayConnection.cs b/OpenRA.Game/Network/ReplayConnection.cs index 7e031fc486..29abbaf308 100755 --- a/OpenRA.Game/Network/ReplayConnection.cs +++ b/OpenRA.Game/Network/ReplayConnection.cs @@ -25,7 +25,7 @@ namespace OpenRA.Network Queue chunks = new Queue(); List sync = new List(); - int ordersFrame = 1; + int ordersFrame; public int LocalClientId { get { return 0; } } public ConnectionState ConnectionState { get { return ConnectionState.Connected; } } @@ -76,6 +76,8 @@ namespace OpenRA.Network } } } + + ordersFrame = LobbyInfo.GlobalSettings.OrderLatency; } // Do nothing: ignore locally generated orders @@ -90,7 +92,7 @@ namespace OpenRA.Network sync.Add(ms.ToArray()); // Store the current frame so Receive() can return the next chunk of orders. - ordersFrame = frame + 1; + ordersFrame = frame + LobbyInfo.GlobalSettings.OrderLatency; } public void Receive(Action packetFn)