X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=sv_user.c;h=1cb5a3f057c305be869a94fdd163658e2098427b;hp=9395be62acf37d7fea8d4e6a0fe97010530e55e3;hb=fe6c374412a5d42d5cd84945d8101c4a398e96d5;hpb=0eb36dc61506a11e8d90a7ea7722bb029d6fc724 diff --git a/sv_user.c b/sv_user.c index 9395be62..1cb5a3f0 100644 --- a/sv_user.c +++ b/sv_user.c @@ -811,7 +811,8 @@ 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 * 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 // the previous one to prevent hacks using float inaccuracy