Reset timedemo counters after wipe

This commit is contained in:
mazmazz 2018-12-27 23:23:09 -05:00
parent 1d9b8d357b
commit 89c12a4ee8
3 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;