From: terencehill Date: Fri, 18 Jan 2013 22:33:30 +0000 (+0100) Subject: Bring back the possibility of showing plain white accuracy values in the scoreboard... X-Git-Tag: xonotic-v0.7.0~98^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e079abcbe5b62453fc7d6af904fdd6b826641ed;p=xonotic%2Fxonotic-data.pk3dir.git Bring back the possibility of showing plain white accuracy values in the scoreboard with the new cvar scoreboard_accuracy_nocolors (before it was possible by setting improperly accuracy_color_levels to "") --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index c51cc0c71..3e8f43421 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 94cd1a5c0..97565bc68 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -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; diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index ea54d0fbe..a576ae493 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -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); }