From c21b27cddba8d77f12e5de3b183b7e4e734e0d03 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 13 Mar 2014 09:40:41 +1300 Subject: [PATCH] Add some more robustness against UI-introduced desyncs. --- OpenRA.Game/Game.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index f73ab66f84..c5de620cbc 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -167,15 +167,15 @@ namespace OpenRA { var tick = Environment.TickCount; + var world = orderManager.world; var uiTickDelta = tick - Ui.LastTickTime; if (uiTickDelta >= Timestep) { Ui.LastTickTime += Timestep; - Ui.Tick(); + Sync.CheckSyncUnchanged(world, Ui.Tick); cursorFrame += 0.5f; } - var world = orderManager.world; var worldTimestep = world == null ? Timestep : world.Timestep; var worldTickDelta = (tick - orderManager.LastTickTime); if (worldTimestep != 0 && worldTickDelta >= worldTimestep)