From: Mario Date: Tue, 14 Jan 2020 17:15:37 +0000 (+1000) Subject: Fix a division by 0 X-Git-Tag: xonotic-v0.8.5~1105^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1abc29f2bd7bedb04fabe392e8990603a579668b;p=xonotic%2Fxonotic-data.pk3dir.git Fix a division by 0 --- diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index 2af309c02..a7937c317 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -82,7 +82,7 @@ void CSQCPlayer_SetPredictionError(vector o, vector v, float onground_diff) csqcplayer_predictionerroro = CSQCPlayer_GetPredictionErrorO() + o; csqcplayer_predictionerrorv = CSQCPlayer_GetPredictionErrorV() + v; - csqcplayer_predictionerrorfactor = autocvar_cl_movement_errorcompensation / ticrate; + csqcplayer_predictionerrorfactor = autocvar_cl_movement_errorcompensation / ((ticrate) ? ticrate : 1); csqcplayer_predictionerrortime = time + 1.0 / csqcplayer_predictionerrorfactor; }