From: terencehill Date: Thu, 4 Aug 2016 22:11:30 +0000 (+0200) Subject: Add a missing check X-Git-Tag: xonotic-v0.8.2~716^2~25 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ef7852c49eecfd61d96dfd1e99978b7c175d7cdc;p=xonotic%2Fxonotic-data.pk3dir.git Add a missing check --- 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;