changed 1-frame warm-up period to 3 frames before time begins advancing
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 May 2007 17:11:04 +0000 (17:11 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 May 2007 17:11:04 +0000 (17:11 +0000)
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

index ce5f95d..2776177 100644 (file)
--- 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