]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix speedhack issue with low cl_netfps / packet loss on servers with sv_clmovement_wa...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 10 Sep 2008 06:04:19 +0000 (06:04 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 10 Sep 2008 06:04:19 +0000 (06:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8493 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c
sv_user.c

index 39cb72ad9309ec8e5d70d4084a9444ede18d103b..ffc4123f6f6ed70b09d29f90f1876e2719de46a0 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -2190,7 +2190,10 @@ void SV_Physics_ClientEntity(prvm_edict_t *ent)
 
        // don't run physics here if running asynchronously
        if (host_client->clmovement_skipphysicsframes <= 0)
+       {
                SV_ClientThink();
+               //host_client->cmd.time = max(host_client->cmd.time, sv.time);
+       }
 
        // make sure the velocity is sane (not a NaN)
        SV_CheckVelocity(ent);
index 525cf97b2008de05b3992927fed7d2377baa4dfa..41755be4e0cad212d2040d9d7862fa09cab9f66c 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -585,7 +585,7 @@ void SV_ExecuteClientMoves(void)
                                // this is a new move
                                move->time = bound(sv.time - 1, move->time, sv.time); // prevent slowhack/speedhack combos
                                move->time = max(move->time, host_client->cmd.time); // prevent backstepping of time
-                               moveframetime = bound(0, move->time - host_client->cmd.time, 0.1);
+                               moveframetime = bound(0, move->time - host_client->cmd.time, sv.frametime * sv_clmovement_waitforinput.integer);
                                //Con_Printf("movesequence = %i (%i lost), moveframetime = %f\n", move->sequence, move->sequence ? move->sequence - host_client->movesequence - 1 : 0, moveframetime);
                                host_client->cmd = *move;
                                host_client->movesequence = move->sequence;