]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a missing check
authorterencehill <piuntn@gmail.com>
Thu, 4 Aug 2016 22:11:30 +0000 (00:11 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 4 Aug 2016 22:11:30 +0000 (00:11 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 984d2babda031053430d54cce3f577f214d41f04..c2c2d26649788b4030064482bce9ac66ef6ff3a2 100644 (file)
@@ -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;