]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
prevent backstepping of clc_move time from doing anything
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 9 Oct 2007 06:23:26 +0000 (06:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 9 Oct 2007 06:23:26 +0000 (06:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7613 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index decd9e54cd25999535308dfb9463f7dbbec966fc..5fc53adcc7e0719865043e9bfde560cf5800559d 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -579,6 +579,7 @@ void SV_ExecuteClientMoves(void)
                                Con_Printf("%smove #%i %ims (%ims) %i %i '%i %i %i' '%i %i %i'\n", (move->time - host_client->cmd.time) > sv.frametime * 1.01 ? "^1" : "^2", move->sequence, (int)floor((move->time - host_client->cmd.time) * 1000.0 + 0.5), (int)floor(move->time * 1000.0 + 0.5), move->impulse, move->buttons, (int)move->viewangles[0], (int)move->viewangles[1], (int)move->viewangles[2], (int)move->forwardmove, (int)move->sidemove, (int)move->upmove);
 #endif
                                // this is a new move
+                               move->time = max(move->time, host_client->cmd.time); // prevent backstepping of time
                                moveframetime = bound(0, move->time - host_client->cmd.time, 0.1);
                                //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;