mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
Use Sys_DoubleTime instead of realtime for timedemos.
Currently, realtime is not really real time thanks to demo_speed.
This commit is contained in:
parent
01466e4e43
commit
3a1e065a57
1 changed files with 2 additions and 2 deletions
|
@ -162,7 +162,7 @@ check_next_demopacket (void)
|
||||||
// if this is the second frame, grab the real td_starttime
|
// if this is the second frame, grab the real td_starttime
|
||||||
// so the bogus time on the first frame doesn't count
|
// so the bogus time on the first frame doesn't count
|
||||||
if (host_framecount == cls.td_startframe + 1)
|
if (host_framecount == cls.td_startframe + 1)
|
||||||
cls.td_starttime = realtime;
|
cls.td_starttime = Sys_DoubleTime ();
|
||||||
} else if (cl.time <= cl.mtime[0]) {
|
} else if (cl.time <= cl.mtime[0]) {
|
||||||
return 0; // don't need another message yet
|
return 0; // don't need another message yet
|
||||||
}
|
}
|
||||||
|
@ -552,7 +552,7 @@ CL_FinishTimeDemo (void)
|
||||||
|
|
||||||
// the first frame didn't count
|
// the first frame didn't count
|
||||||
frames = (host_framecount - cls.td_startframe) - 1;
|
frames = (host_framecount - cls.td_startframe) - 1;
|
||||||
time = realtime - cls.td_starttime;
|
time = Sys_DoubleTime () - cls.td_starttime;
|
||||||
if (!time)
|
if (!time)
|
||||||
time = 1;
|
time = 1;
|
||||||
Sys_Printf ("%i frame%s %.4g seconds %.4g fps\n", frames,
|
Sys_Printf ("%i frame%s %.4g seconds %.4g fps\n", frames,
|
||||||
|
|
Loading…
Reference in a new issue