Rework and rename Sync.CheckSyncUnchanged

This commit is contained in:
Paul Chote
2018-12-23 22:37:45 +00:00
committed by reaperrr
parent b41c178cb9
commit 83e44bee66
7 changed files with 18 additions and 19 deletions

View File

@@ -570,7 +570,7 @@ namespace OpenRA
var integralTickTimestep = (uiTickDelta / Timestep) * Timestep;
Ui.LastTickTime += integralTickTimestep >= TimestepJankThreshold ? integralTickTimestep : Timestep;
Sync.CheckSyncUnchanged(world, Ui.Tick);
Sync.RunUnsynced(Settings.Debug.SyncCheckUnsyncedCode, world, Ui.Tick);
Cursor.Tick();
}
@@ -588,7 +588,7 @@ namespace OpenRA
orderManager.LastTickTime += integralTickTimestep >= TimestepJankThreshold ? integralTickTimestep : worldTimestep;
Sound.Tick();
Sync.CheckSyncUnchanged(world, orderManager.TickImmediate);
Sync.RunUnsynced(Settings.Debug.SyncCheckUnsyncedCode, world, orderManager.TickImmediate);
if (world == null)
return;
@@ -607,7 +607,7 @@ namespace OpenRA
if (isNetTick)
orderManager.Tick();
Sync.CheckSyncUnchanged(world, () =>
Sync.RunUnsynced(Settings.Debug.SyncCheckUnsyncedCode, world, () =>
{
world.OrderGenerator.Tick(world);
world.Selection.Tick(world);
@@ -622,7 +622,7 @@ namespace OpenRA
// Wait until we have done our first world Tick before TickRendering
if (orderManager.LocalFrameNumber > 0)
Sync.CheckSyncUnchanged(world, () => world.TickRender(worldRenderer));
Sync.RunUnsynced(Settings.Debug.SyncCheckUnsyncedCode, world, () => world.TickRender(worldRenderer));
}
}
}