diff --git a/src/d_main.c b/src/d_main.c index dd2cfe0e5..481818754 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -483,6 +483,13 @@ static void D_Display(void) F_WipeEndScreen(); F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK); } + + // reset counters so timedemo doesn't count the wipe duration + if (timingdemo) + { + framecount = 0; + demostarttime = I_GetTime(); + } } NetUpdate(); // send out any new accumulation diff --git a/src/g_game.c b/src/g_game.c index 213c3b83e..273b582a4 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -97,7 +97,7 @@ UINT32 demoIdleTime = 3*TICRATE; boolean timingdemo; // if true, exit with report on completion boolean nodrawers; // for comparative timing purposes boolean noblit; // for comparative timing purposes -static tic_t demostarttime; // for comparative timing purposes +tic_t demostarttime; // for comparative timing purposes boolean netgame; // only true if packets are broadcast boolean multiplayer; diff --git a/src/g_game.h b/src/g_game.h index 5259eacbb..7260d3384 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -37,6 +37,7 @@ extern boolean playeringame[MAXPLAYERS]; // demoplaying back and demo recording extern boolean demoplayback, titledemo, demorecording, timingdemo; +extern tic_t demostarttime; // Quit after playing a demo from cmdline. extern boolean singledemo;