From e90aa02af2547b9e9dc1faeab5fd778ef93447c7 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Thu, 27 Feb 2025 20:08:25 -0600 Subject: [PATCH] correct mangled stopwatch logic it was having issues with setting a time after pausing --- Engine/source/T3D/fps/guiClockHud.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/source/T3D/fps/guiClockHud.cpp b/Engine/source/T3D/fps/guiClockHud.cpp index 9d4c36057..0b23db3de 100644 --- a/Engine/source/T3D/fps/guiClockHud.cpp +++ b/Engine/source/T3D/fps/guiClockHud.cpp @@ -179,8 +179,8 @@ void GuiClockHud::setReverseTime(F32 time) // Set the current time in seconds. mTimeReversed = true; mTimeOffset = S32(time * 1000) + Platform::getVirtualMilliseconds(); - mPausedTime = S32(F32(mTimeOffset + Platform::getVirtualMilliseconds()) / 1000); mSignificantTimeReached = false; + mPausedTime = getTime(); } void GuiClockHud::setTime(F32 time) @@ -188,8 +188,8 @@ void GuiClockHud::setTime(F32 time) // Set the current time in seconds. mTimeReversed = false; mTimeOffset = S32(time * 1000) - Platform::getVirtualMilliseconds(); - mPausedTime = S32(F32(mTimeOffset - Platform::getVirtualMilliseconds()) / 1000); mSignificantTimeReached = false; + mPausedTime = getTime(); } F32 GuiClockHud::getTime()