]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
final speedhack fixes
[xonotic/darkplaces.git] / sv_user.c
index 5fc53adcc7e0719865043e9bfde560cf5800559d..a2fb80d88ec9ed56ff56b617f64b510da20ef3dc 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -371,6 +371,8 @@ void SV_ClientThink (void)
 {
        vec3_t v_angle;
 
+       //Con_Printf("clientthink for %ims\n", (int) (sv.frametime * 1000));
+
        SV_ApplyClientMove();
        // make sure the velocity is sane (not a NaN)
        SV_CheckVelocity(host_client->edict);
@@ -627,6 +629,7 @@ void SV_ExecuteClientMoves(void)
                        }
                }
                // now copy the new move
+               sv_readmoves[sv_numreadmoves-1].time = max(sv_readmoves[sv_numreadmoves-1].time, host_client->cmd.time); // prevent backstepping of time
                host_client->cmd = sv_readmoves[sv_numreadmoves-1];
                host_client->movesequence = 0;
                // make sure that normal physics takes over immediately