From bba9c4b9763b1dd71c99c37361b7106c87e64e58 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 16 Oct 2010 09:48:39 +1300 Subject: [PATCH] #313 fixed -- there's unsynced code that runs in Tick, too. --- OpenRA.Game/Game.cs | 8 ++++++-- OpenRA.Game/World.cs | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index a2d6b242b1..a282b3f7af 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -135,8 +135,12 @@ namespace OpenRA if( isNetTick ) orderManager.Tick(); - world.OrderGenerator.Tick( world ); - world.Selection.Tick( world ); + Sync.CheckSyncUnchanged(world, () => + { + world.OrderGenerator.Tick(world); + world.Selection.Tick(world); + }); + world.Tick(); worldRenderer.Tick(); diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index f51f6e33ff..c4d71398ca 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -13,13 +13,11 @@ using System.Collections.Generic; using OpenRA.Collections; using OpenRA.Effects; using OpenRA.FileFormats; -using OpenRA.Graphics; using OpenRA.Network; using OpenRA.Orders; using OpenRA.Traits; - -using XRandom = OpenRA.Thirdparty.Random; using OpenRA.Widgets; +using XRandom = OpenRA.Thirdparty.Random; namespace OpenRA {