]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a division by 0
authorMario <mario.mario@y7mail.com>
Tue, 14 Jan 2020 17:15:37 +0000 (03:15 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 14 Jan 2020 17:15:37 +0000 (03:15 +1000)
qcsrc/lib/csqcmodel/cl_player.qc

index 2af309c02e2a2c364973127c210c70c5f5f4dbb4..a7937c317f84e0f2fb7392789429dab06c2e70c5 100644 (file)
@@ -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;
 }