Fix desync handling

This commit is contained in:
tomas
2022-03-15 19:59:00 +01:00
committed by Matthias Mailänder
parent dab8ee4f94
commit 8e19463450
3 changed files with 25 additions and 8 deletions

View File

@@ -59,6 +59,7 @@ namespace OpenRA.Network
bool generateSyncReport = false;
int sentOrdersFrame = 0;
float tickScale = 1f;
bool outOfSync = false;
public struct ClientOrder
{
@@ -73,8 +74,14 @@ namespace OpenRA.Network
void OutOfSync(int frame)
{
if (outOfSync)
return;
syncReport.DumpSyncReport(frame);
throw new InvalidOperationException($"Out of sync in frame {frame}.\n Compare syncreport.log with other players.");
World.OutOfSync();
outOfSync = true;
TextNotificationsManager.AddSystemLine($"Out of sync in frame {frame}.\nCompare syncreport.log with other players.");
}
public void StartGame()