From: divverent Date: Sat, 7 Nov 2009 18:03:15 +0000 (+0000) Subject: clmovement: do not replay less than 0.5ms sized movement data (should prevent NaNs) X-Git-Tag: xonotic-v0.1.0preview~1188 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1853eea67e36124dd9b21ab1464467a43340433a;p=xonotic%2Fdarkplaces.git clmovement: do not replay less than 0.5ms sized movement data (should prevent NaNs) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9454 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_input.c b/cl_input.c index 6e41506e..57f40366 100644 --- a/cl_input.c +++ b/cl_input.c @@ -1469,13 +1469,16 @@ void CL_ClientMovement_Replay(void) s.cmd.canjump = cl.movecmd[i+1].canjump; // if a move is more than 50ms, do it as two moves (matching qwsv) //Con_Printf("%i ", s.cmd.msec); - if (s.cmd.frametime > 0.05) + if(s.cmd.frametime > 0.0005) { - s.cmd.frametime /= 2; + if (s.cmd.frametime > 0.05) + { + s.cmd.frametime /= 2; + CL_ClientMovement_PlayerMove(&s); + } CL_ClientMovement_PlayerMove(&s); + cl.movecmd[i].canjump = s.cmd.canjump; } - CL_ClientMovement_PlayerMove(&s); - cl.movecmd[i].canjump = s.cmd.canjump; } //Con_Printf("\n"); CL_ClientMovement_UpdateStatus(&s);