From: terencehill Date: Mon, 8 Nov 2010 17:25:26 +0000 (+0100) Subject: Since accuracy colors aren't used exclusively by the HUD weapons panel, rename hud_pa... X-Git-Tag: xonotic-v0.1.0preview~134^2~6^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=37ec68aadec2bce316f186bc6f474ecec96ceca4;p=xonotic%2Fxonotic-data.pk3dir.git Since accuracy colors aren't used exclusively by the HUD weapons panel, rename hud_panel_weapons_accuracy_color* to accuracy_color* --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index dfd211f47..88acfa705 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1382,11 +1382,7 @@ exec hud_luminos.cfg seta hud_panel_weapons_label 1 "1 = show number of weapon, 2 = show bound key of weapon" seta hud_panel_weapons_complainbubble_time 1 "time that a new entry stays until it fades out" seta hud_panel_weapons_complainbubble_fadetime 0.25 "fade out time" -seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background" -seta hud_panel_weapons_accuracy_color0 "1 0 0" -seta hud_panel_weapons_accuracy_color1 "1 1 0" -seta hud_panel_weapons_accuracy_color2 "0 1 0" -seta hud_panel_weapons_accuracy_color_levels "0 20 100" "accuracy values at which a specified color (hud_panel_weapons_accuracy_color) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order" +seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars" seta hud_panel_weapons_ammo 1 "show ammo as a status bar" seta hud_panel_weapons_ammo_full_shells 50 "show 100% of the status bar at this ammo count" seta hud_panel_weapons_ammo_full_nails 200 "show 100% of the status bar at this ammo count" @@ -1420,7 +1416,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 1 "show weapon accuracy stats panel on scoreboard" +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" seta scoreboard_color_bg_b 0.6 "blue color component of the scoreboard background" @@ -1438,6 +1434,11 @@ seta scoreboard_offset_left 0.04 "how many pixels the scoreboard is offset from seta scoreboard_offset_right 0.148 "how many pixels the scoreboard is offset from the right screen edge" seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background" +seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order" +seta accuracy_color0 "1 0 0" +seta accuracy_color1 "1 1 0" +seta accuracy_color2 "0 1 0" + // for menu server list (eventually make them have engine support?) seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join" seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index f9f5fa18d..b41c45e43 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -1285,11 +1285,11 @@ void CSQC_common_hud(void) float i; if(!(gametype == GAME_RACE || gametype == GAME_CTS)) { - if(cvar_string("hud_panel_weapons_accuracy_color_levels") != acc_color_levels) + if(cvar_string("accuracy_color_levels") != acc_color_levels) { if(acc_color_levels) strunzone(acc_color_levels); - acc_color_levels = strzone(cvar_string("hud_panel_weapons_accuracy_color_levels")); + acc_color_levels = strzone(cvar_string("accuracy_color_levels")); acc_levels = tokenize(acc_color_levels); if (acc_levels > MAX_ACCURACY_LEVELS) acc_levels = MAX_ACCURACY_LEVELS; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 2d7d8732b..c5aab4eb6 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1706,7 +1706,7 @@ void HUD_Weapons(void) weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64); if (acc_col_x[0] == -1) for (i = 0; i < acc_levels; ++i) - acc_col[i] = stov(cvar_string(strcat("hud_panel_weapons_accuracy_color", ftos(i)))); + acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i)))); } float weapons_st = getstati(STAT_WEAPONS); diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 906b339bf..ec17dfca7 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -955,7 +955,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) rgb = '1 1 1'; else if (acc_col_x[0] == -1) for (i = 0; i < acc_levels; ++i) - acc_col[i] = stov(cvar_string(strcat("hud_panel_weapons_accuracy_color", ftos(i)))); + acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i)))); for(i = WEP_FIRST; i <= WEP_LAST; ++i) {