fixed 'slow gravity' bug when cl_movement players are not replying to all server...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Jun 2006 12:46:07 +0000 (12:46 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Jun 2006 12:46:07 +0000 (12:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6460 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index 480c46a..9ef6b38 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -559,10 +559,14 @@ qboolean SV_ReadClientMove (void)
                {
                        double frametime = bound(0, move->time - oldmovetime, 0.1);
                        double oldframetime = prog->globals.server->frametime;
+                       double oldframetime2 = sv.frametime;
                        //if (move->time - oldmovetime >= 0.1001)
                        //      Con_DPrintf("client move exceeds 100ms!  (time %f -> time %f)\n", oldmovetime, move->time);
+                       // the server and qc frametime values must be changed temporarily
+                       sv.frametime = frametime;
                        prog->globals.server->frametime = frametime;
                        SV_Physics_ClientEntity(host_client->edict);
+                       sv.frametime = oldframetime2;
                        prog->globals.server->frametime = oldframetime;
                        host_client->clmovement_skipphysicsframes = sv_clmovement_waitforinput.integer;
                }