mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
correct mangled stopwatch logic
it was having issues with setting a time after pausing
This commit is contained in:
parent
5f1eec0e00
commit
e90aa02af2
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue