mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 12:04:38 -04:00
fix timing demo (#720)
This commit is contained in:
parent
052275aedd
commit
bc21a66ef9
20
src/g_game.c
20
src/g_game.c
@ -3783,6 +3783,16 @@ boolean G_CheckDemoStatus(void)
|
|||||||
ticcmd_t* cmd = last_cmd;
|
ticcmd_t* cmd = last_cmd;
|
||||||
last_cmd = NULL;
|
last_cmd = NULL;
|
||||||
|
|
||||||
|
if (timingdemo)
|
||||||
|
{
|
||||||
|
int endtime = I_GetTime_RealTime();
|
||||||
|
// killough -- added fps information and made it work for longer demos:
|
||||||
|
unsigned realtics = endtime-starttime;
|
||||||
|
I_Error ("Timed %u gametics in %u realtics = %-.1f frames per second",
|
||||||
|
(unsigned) gametic,realtics,
|
||||||
|
(unsigned) gametic * (double) TICRATE / realtics);
|
||||||
|
}
|
||||||
|
|
||||||
if (demoplayback)
|
if (demoplayback)
|
||||||
{
|
{
|
||||||
if (demorecording)
|
if (demorecording)
|
||||||
@ -3848,16 +3858,6 @@ boolean G_CheckDemoStatus(void)
|
|||||||
return false; // killough
|
return false; // killough
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timingdemo)
|
|
||||||
{
|
|
||||||
int endtime = I_GetTime_RealTime();
|
|
||||||
// killough -- added fps information and made it work for longer demos:
|
|
||||||
unsigned realtics = endtime-starttime;
|
|
||||||
I_Error ("Timed %u gametics in %u realtics = %-.1f frames per second",
|
|
||||||
(unsigned) gametic,realtics,
|
|
||||||
(unsigned) gametic * (double) TICRATE / realtics);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user