diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameTimerLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameTimerLogic.cs index 35fc16ccff..6fb1ca0a79 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameTimerLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameTimerLogic.cs @@ -23,6 +23,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var timer = widget.GetOrNull("GAME_TIMER"); var status = widget.GetOrNull("GAME_TIMER_STATUS"); + var tlm = world.WorldActor.TraitOrDefault(); var startTick = Ui.LastTickTime; Func shouldShowStatus = () => (world.Paused || world.Timestep != world.LobbyInfo.GlobalSettings.Timestep) @@ -51,7 +52,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (status == null && shouldShowStatus()) return statusText(); - return WidgetUtils.FormatTime(world.WorldTick, timestep); + var timeLimit = tlm != null ? tlm.TimeLimit : 0; + var displayTick = timeLimit > 0 ? timeLimit - world.WorldTick : world.WorldTick; + return WidgetUtils.FormatTime(displayTick, timestep); }; }