- fixed: screen->FrameTime should use an adjusted frame start time

This commit is contained in:
Rachael Alexanderson 2017-12-07 03:01:57 -05:00
parent 29d2d8b3f8
commit a29d9e157c
3 changed files with 9 additions and 1 deletions

View File

@ -781,7 +781,7 @@ void D_Display ()
{
screen->FrameTime = I_msTime();
screen->FrameTime = I_msTimeFS();
TexMan.UpdateAnimations(screen->FrameTime);
R_UpdateSky(screen->FrameTime);
switch (gamestate)

View File

@ -164,6 +164,11 @@ uint64_t I_msTime()
return NSToMS(I_nsTime());
}
uint64_t I_msTimeFS() // from "start"
{
return NSToMS(I_nsTime() - FirstFrameStartTime);
}
int I_GetTime()
{
return NSToTic(CurrentFrameStartTime - FirstFrameStartTime);

View File

@ -22,5 +22,8 @@ void I_FreezeTime(bool frozen);
// [RH] Returns millisecond-accurate time
uint64_t I_msTime();
// [SP] Returns millisecond-accurate time from start
uint64_t I_msTimeFS();
// Nanosecond-accurate time
uint64_t I_nsTime();