Prevent negative times in GameTimerLogic

This commit is contained in:
abcdefg30
2019-05-16 13:59:31 +02:00
committed by abcdefg30
parent 28016a3a33
commit 09d6387e64

View File

@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var timeLimit = tlm != null ? tlm.TimeLimit : 0;
var displayTick = timeLimit > 0 ? timeLimit - world.WorldTick : world.WorldTick;
return WidgetUtils.FormatTime(displayTick, timestep);
return WidgetUtils.FormatTime(Math.Max(0, displayTick), timestep);
};
}