From ef7852c49eecfd61d96dfd1e99978b7c175d7cdc Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 5 Aug 2016 00:11:30 +0200 Subject: [PATCH] Add a missing check --- qcsrc/client/hud/panel/scoreboard.qc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 984d2babd..c2c2d2664 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1020,14 +1020,17 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) if (sbt_bg_alpha) drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, sbt_bg_alpha, DRAWFLAG_NORMAL); - // column highlighting - for (int i = 0; i < columnns; ++i) - if ((i % 2) == 0) - drawfill(pos + eX * weapon_width * rows * i, eY * height * rows + eX * weapon_width * rows, '0 0 0', sbt_highlight_alpha, DRAWFLAG_NORMAL); - - // row highlighting - for (int i = 0; i < rows; ++i) - drawfill(pos + eY * weapon_height + eY * height * i, eX * tmp.x + eY * fontsize, '1 1 1', sbt_highlight_alpha, DRAWFLAG_NORMAL); + if(sbt_highlight) + { + // column highlighting + for (int i = 0; i < columnns; ++i) + if ((i % 2) == 0) + drawfill(pos + eX * weapon_width * rows * i, eY * height * rows + eX * weapon_width * rows, '0 0 0', sbt_highlight_alpha, DRAWFLAG_NORMAL); + + // row highlighting + for (int i = 0; i < rows; ++i) + drawfill(pos + eY * weapon_height + eY * height * i, eX * tmp.x + eY * fontsize, '1 1 1', sbt_highlight_alpha, DRAWFLAG_NORMAL); + } average_accuracy = 0; int weapons_with_stats = 0; -- 2.39.2