- updated common code from screenjob branch.

That is, all parts not related to cutscenes.
This commit is contained in:
Christoph Oelckers 2021-08-03 12:30:44 +02:00
commit c1a8776a15
16 changed files with 163 additions and 21 deletions

View file

@ -195,9 +195,16 @@ void I_FreezeTime(bool frozen)
else
{
assert(FreezeTime != 0);
FirstFrameStartTime += GetClockTimeNS() - FreezeTime;
if (FirstFrameStartTime != 0) FirstFrameStartTime += GetClockTimeNS() - FreezeTime;
FreezeTime = 0;
I_SetFrameTime();
}
}
void I_ResetFrameTime()
{
// Reset the starting point of the current frame to now. For use after lengthy operations that should not result in tic accumulation.
auto ft = CurrentFrameStartTime;
I_SetFrameTime();
FirstFrameStartTime += (CurrentFrameStartTime - ft);
}