Refactor send and receive Orders loop

This commit is contained in:
teinarss
2021-05-27 19:29:10 +02:00
committed by abcdefg30
parent 5e1468facb
commit f3777a25e6
7 changed files with 152 additions and 54 deletions

View File

@@ -24,10 +24,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var timer = widget.GetOrNull<LabelWidget>("GAME_TIMER");
var status = widget.GetOrNull<LabelWidget>("GAME_TIMER_STATUS");
var tlm = world.WorldActor.TraitOrDefault<TimeLimitManager>();
var startTick = Ui.LastTickTime;
var startTick = Ui.LastTickTime.Value;
Func<bool> shouldShowStatus = () => (world.Paused || world.ReplayTimestep != world.Timestep)
&& (Ui.LastTickTime - startTick) / 1000 % 2 == 0;
&& (Ui.LastTickTime.Value - startTick) / 1000 % 2 == 0;
Func<string> statusText = () =>
{