]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Since accuracy colors aren't used exclusively by the HUD weapons panel, rename hud_pa...
authorterencehill <piuntn@gmail.com>
Mon, 8 Nov 2010 17:25:26 +0000 (18:25 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 8 Nov 2010 17:25:26 +0000 (18:25 +0100)
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/client/scoreboard.qc

index dfd211f478680b9ee2f4b92c3661d4084afaf7b7..88acfa705a203c1f7409408e3c92de333e35eee5 100644 (file)
@@ -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<X>) 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<X>) 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"
index f9f5fa18dfbf6c4d7c9ba2e14df879fc52c57712..b41c45e43b646adfa1bc65396ed5545d6da7daeb 100644 (file)
@@ -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;
index 2d7d8732b269468156b4470e0934756af371a779..c5aab4eb6a15d00957a1aa33e2525ecfaddfe883 100644 (file)
@@ -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);
index 906b339bf894f68a865beb8b36d7ed930ab6ab68..ec17dfca77efe473c73a5146513c1744f6820fe8 100644 (file)
@@ -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)
        {