]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bring back the possibility of showing plain white accuracy values in the scoreboard...
authorterencehill <piuntn@gmail.com>
Fri, 18 Jan 2013 22:33:30 +0000 (23:33 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 5 Feb 2013 15:08:57 +0000 (16:08 +0100)
defaultXonotic.cfg
qcsrc/client/autocvars.qh
qcsrc/client/scoreboard.qc

index c51cc0c717cd3765e5e741627f3824759e2b793b..3e8f43421aebcb713fa03bcf50382a458aa2a702 100644 (file)
@@ -945,6 +945,7 @@ seta scoreboard_columns default
 seta scoreboard_border_thickness 1 "scoreboard border thickness"
 seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
 seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
+seta scoreboard_accuracy_nocolors 0 "don't use colors displaying accuracy stats"
 seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
 seta scoreboard_color_bg_r 0 "red color component of the scoreboard background"
 seta scoreboard_color_bg_g 0.4 "green color component of the scoreboard background"
index 94cd1a5c03bb4b03450aa61a3facea5e0e874145..97565bc68de822d384a4a5c68504749faa83e6c0 100644 (file)
@@ -353,6 +353,7 @@ float autocvar_r_fullbright;
 float autocvar_r_letterbox;
 float autocvar_scoreboard_accuracy;
 float autocvar_scoreboard_accuracy_doublerows;
+float autocvar_scoreboard_accuracy_nocolors;
 float autocvar_scoreboard_alpha_bg;
 var float autocvar_scoreboard_alpha_fg = 1.0;
 var float autocvar_scoreboard_alpha_name = 0.9;
index ea54d0fbee38823a790acc86f74251d218025c63..a576ae4937e5c40e683cafc752c5094920f50e76 100644 (file)
@@ -998,8 +998,10 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                g_minstagib = 1; // TODO: real detection for minstagib?
 
        float weapon_stats;
-
-       Accuracy_LoadColors();
+       if(autocvar_scoreboard_accuracy_nocolors)
+               rgb = '1 1 1';
+       else
+               Accuracy_LoadColors();
 
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
@@ -1029,7 +1031,8 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        float padding;
                        padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
 
-                       rgb = Accuracy_GetColor(weapon_stats);
+                       if(!autocvar_scoreboard_accuracy_nocolors)
+                               rgb = Accuracy_GetColor(weapon_stats);
 
                        drawstring(pos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
                }