Merge pull request #10089 from abcdefg30/shellmapCPU

Try to win a small amount of performance when the shellmap is disabled
This commit is contained in:
Matthias Mailänder
2015-12-31 12:22:14 +01:00
3 changed files with 12 additions and 14 deletions

View File

@@ -491,7 +491,11 @@ namespace OpenRA
Sound.Tick();
Sync.CheckSyncUnchanged(world, orderManager.TickImmediate);
if (world != null)
if (world == null)
return;
// Don't tick when the shellmap is disabled
if (world.ShouldTick)
{
var isNetTick = LocalTick % NetTickScale == 0;
@@ -517,12 +521,13 @@ namespace OpenRA
PerfHistory.Tick();
}
else
if (orderManager.NetFrameNumber == 0)
orderManager.LastTickTime = RunTime;
else if (orderManager.NetFrameNumber == 0)
orderManager.LastTickTime = RunTime;
Sync.CheckSyncUnchanged(world, () => world.TickRender(worldRenderer));
}
else
PerfHistory.Tick();
}
}
}