From: cloudwalk Date: Tue, 30 Mar 2021 16:19:13 +0000 (+0000) Subject: sv_user: Check if frametime is positive X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1fe13da8a5fbb6b1ae4e7dcf55c415cf6846b59b;p=xonotic%2Fdarkplaces.git sv_user: Check if frametime is positive From bones_was_here git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13107 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_user.c b/sv_user.c index 11354a14..1cb5a3f0 100644 --- a/sv_user.c +++ b/sv_user.c @@ -811,7 +811,7 @@ static void SV_ExecuteClientMoves(void) 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 // bones_was_here: limit moveframetime to a multiple of sv.frametime to match inputtimeout behaviour - moveframetime = min(move->time - host_client->cmd.time, min(0.1, sys_ticrate.value > 0.0 && sv.frametime ? sv.frametime * ceil(sv_clmovement_inputtimeout.value / sv.frametime) : sv_clmovement_inputtimeout.value)); + moveframetime = min(move->time - host_client->cmd.time, min(0.1, sys_ticrate.value > 0.0 && sv.frametime > 0.0 ? sv.frametime * ceil(sv_clmovement_inputtimeout.value / sv.frametime) : sv_clmovement_inputtimeout.value)); // discard (treat like lost) moves with too low distance from