move an access of Viewport into Game
This commit is contained in:
@@ -113,6 +113,8 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
lastTime += Settings.Game.Timestep;
|
lastTime += Settings.Game.Timestep;
|
||||||
Widget.DoTick(world);
|
Widget.DoTick(world);
|
||||||
|
if( world.GameHasStarted && world.LocalPlayer != null )
|
||||||
|
++Viewport.TicksSinceLastMove;
|
||||||
Sound.Tick();
|
Sound.Tick();
|
||||||
Sync.CheckSyncUnchanged( world, () => { orderManager.TickImmediate( world ); } );
|
Sync.CheckSyncUnchanged( world, () => { orderManager.TickImmediate( world ); } );
|
||||||
|
|
||||||
|
|||||||
@@ -338,10 +338,6 @@ namespace OpenRA.Widgets
|
|||||||
public static void DoTick(World world)
|
public static void DoTick(World world)
|
||||||
{
|
{
|
||||||
RootWidget.Tick(world);
|
RootWidget.Tick(world);
|
||||||
|
|
||||||
if (!world.GameHasStarted) return;
|
|
||||||
if (world.LocalPlayer == null) return;
|
|
||||||
++Viewport.TicksSinceLastMove;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DoDraw()
|
public static void DoDraw()
|
||||||
|
|||||||
Reference in New Issue
Block a user