From 1abc29f2bd7bedb04fabe392e8990603a579668b Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 15 Jan 2020 03:15:37 +1000 Subject: [PATCH] Fix a division by 0 --- qcsrc/lib/csqcmodel/cl_player.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2