From a3f0832b7e7b5d1919930b0cfd813d731e1e7d3b Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 16 May 2007 17:11:04 +0000 Subject: [PATCH] changed 1-frame warm-up period to 3 frames before time begins advancing in the timedemo playback (meaning 3 identical frames are rendered first) this should improve consistency of timedemo results git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7291 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_demo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cl_demo.c b/cl_demo.c index ce5f95d7..27761778 100644 --- a/cl_demo.c +++ b/cl_demo.c @@ -152,12 +152,14 @@ void CL_ReadDemoMessage(void) } if (cls.td_lastframe == -1) { - // we start counting on the second frame - // (after parsing connection stuff) - cls.td_startframe = host_framecount + 1; + // render a couple frames before we start counting + cls.td_startframe = host_framecount + 3; } cls.td_lastframe = host_framecount; cls.td_onesecondframes++; + // don't read any new messages during the warm-up period + if (host_framecount < cls.td_startframe) + return; // if this is the first official frame we can now grab the real // td_starttime so the bogus time on the first frame doesn't // count against the final report -- 2.39.2