From 058ef479b88179ef85a318e27e1c2030326ac4ce Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 9 Sep 2016 21:10:01 +0200 Subject: [PATCH] Avoid a division by 0 (it happened playing DOM on a map that doesn't support DOM) --- qcsrc/client/hud/panel/modicons.qc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/hud/panel/modicons.qc b/qcsrc/client/hud/panel/modicons.qc index 2a12e81c2..a4d84cf9e 100644 --- a/qcsrc/client/hud/panel/modicons.qc +++ b/qcsrc/client/hud/panel/modicons.qc @@ -676,7 +676,9 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, in color = '1 0 1'; break; } - float pps_ratio = stat / STAT(DOM_TOTAL_PPS); + float pps_ratio = 0; + if(STAT(DOM_TOTAL_PPS)) + pps_ratio = stat / STAT(DOM_TOTAL_PPS); if(mySize.x/mySize.y > aspect_ratio) { -- 2.39.2