From 8ed2e0f039a14ac2d6684a2fa963bcfedefa2f1f Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 11 Jul 2007 11:01:21 +0000 Subject: [PATCH] fix bug with large time skips in demo playback being slowly interpolated 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 | 10 +++++++++- todo | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cl_parse.c b/cl_parse.c index efee4d7b..ba6343a9 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -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 7b7cedba..620ba599 100644 --- 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) -- 2.39.2