From 3be3b7da6402d35fd71e741d471dc70af6248429 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Thu, 4 Feb 2021 15:29:47 +0100 Subject: [PATCH] Fix suspicion timer going negative and counting up. The sign was never shown but it's still silly. --- .../UserInterface/Suspicion/SuspicionGui.xaml.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Content.Client/UserInterface/Suspicion/SuspicionGui.xaml.cs b/Content.Client/UserInterface/Suspicion/SuspicionGui.xaml.cs index a9694fbe20..1ac94bc906 100644 --- a/Content.Client/UserInterface/Suspicion/SuspicionGui.xaml.cs +++ b/Content.Client/UserInterface/Suspicion/SuspicionGui.xaml.cs @@ -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}"; }