Fix suspicion timer going negative and counting up.

The sign was never shown but it's still silly.
This commit is contained in:
Pieter-Jan Briers
2021-02-04 15:29:47 +01:00
parent 6b8cc9fc40
commit 3be3b7da64

View File

@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using Content.Client.GameObjects.Components.Suspicion;
@@ -92,7 +93,11 @@ namespace Content.Client.UserInterface.Suspicion
}
else
{
var diff = _timing.CurTime - endTime.Value;
var diff = endTime.Value - _timing.CurTime;
if (diff < TimeSpan.Zero)
{
diff = TimeSpan.Zero;
}
TimerLabel.Visible = true;
TimerLabel.Text = $"{diff:mm\\:ss}";
}