]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug with large time skips in demo playback being slowly interpolated
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Jul 2007 11:01:21 +0000 (11:01 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Jul 2007 11:01:21 +0000 (11:01 +0000)
rather than simply skipped as in Quake, this fixes Nehahra movie
playback (where scene cuts are associated with large time deltas), as
well as fixing the view angle interpolation on the first frame of all
other demos

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7483 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
todo

index efee4d7ba798df9198308775e08cf56879418cbc..ba6343a9d6ddefe2673d69b12a898ebb2e907c1f 100644 (file)
@@ -2885,7 +2885,15 @@ static void CL_NetworkTimeReceived(double newtime)
        cl.mtime[0] = newtime;
        if (cls.timedemo || (cl.islocalgame && !sv_fixedframeratesingleplayer.integer) || cl.mtime[1] == cl.mtime[0] || cls.signon < SIGNONS)
                cl.time = cl.mtime[1] = newtime;
-       else if (cls.protocol != PROTOCOL_QUAKEWORLD && !cls.demoplayback)
+       else if (cls.demoplayback)
+       {       
+               // when time falls behind during demo playback it means the cl.mtime[1] was altered
+               // due to a large time gap, so treat it as an instant change in time
+               // (this can also happen during heavy packet loss in the demo)
+               if (cl.time < newtime - 0.1)
+                       cl.mtime[1] = cl.time = newtime;
+       }
+       else if (cls.protocol != PROTOCOL_QUAKEWORLD)
        {
                cl.mtime[1] = max(cl.mtime[1], cl.mtime[0] - 0.1);
                if (developer.integer >= 100 && vid_activewindow)
diff --git a/todo b/todo
index 7b7cedbad8ff9b2e8e9aa7b37a0edd944d8483b6..620ba59998c9d20e790cf46ad365c287ab6d5b89 100644 (file)
--- a/todo
+++ b/todo
@@ -496,6 +496,8 @@ d bug darkplaces client: seta commands create cvars that are not saved to config
 d bug darkplaces client: svc_effect should post a warning and do nothing if given a framerate below 1 (Willis)
 d bug darkplaces client: te_customflash isn't working? (Wazat)
 d bug darkplaces client: userinfo strings are not being updated by name/color commands
+d bug darkplaces client: when playing back a demo in slow motion it is very noticable that the camera rotates into position on the first frame (Stribbs)
+d bug darkplaces client: when playing back nehahra demos they often contain large time skips at scene cuts which are interpolating slowly over several seconds (Stribbs)
 d bug darkplaces collision: check Urre's sltest.bsp and slopestuck.dem and fix the sticking bug, which only happens with sv_newflymove 1 (Urre)
 d bug darkplaces collision: frikbots are falling through the map (Sajt)
 d bug darkplaces commands: say command is not posting to server console (Vermeulen)