From: havoc Date: Tue, 9 Oct 2007 06:23:26 +0000 (+0000) Subject: prevent backstepping of clc_move time from doing anything X-Git-Tag: xonotic-v0.1.0preview~2865 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a00d6cf48d4e49715abec095309e203b743d07f7;p=xonotic%2Fdarkplaces.git prevent backstepping of clc_move time from doing anything git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7613 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_user.c b/sv_user.c index decd9e54..5fc53adc 100644 --- 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;