seta hud_panel_scoreboard_accuracy_showdelay 2 "how long to delay displaying accuracy below the scoreboard if it's too far down"
seta hud_panel_scoreboard_accuracy_showdelay_minpos 0.75 "delay displaying the accuracy panel only if its position is lower than this percentage of the screen height from the top"
+seta hud_panel_scoreboard_itemstats_filter 1 "filter out less interesting items (ammo and smaller health/armor)"
seta hud_panel_scoreboard_team_size_position 0 "where to show the team size (0 = do not show, 1 = left of scoreboard, 2 = right of scoreboard), will move team scores to the other side if necessary"
seta _hud_panel_strafehud_demo "0" "strafehud changes angle during configure"
seta hud_panel_scoreboard_bg_teams_color_team "" "override panel team color in team tables"
seta hud_panel_scoreboard_accuracy_doublerows "" "use two rows instead of one"
seta hud_panel_scoreboard_accuracy_nocolors "" "don't use colors displaying accuracy stats"
+seta hud_panel_scoreboard_itemstats_doublerows "" "use two rows instead of one"
seta hud_panel_strafehud_pos "" "position of this base of the panel"
seta hud_panel_strafehud_size "" "size of this panel"
seta hud_panel_scoreboard_bg_teams_color_team "0"
seta hud_panel_scoreboard_accuracy_doublerows "0"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_scoreboard_itemstats_doublerows "0"
seta hud_panel_strafehud_pos "0.320000 0.570000"
seta hud_panel_strafehud_size "0.360000 0.020000"
seta hud_panel_scoreboard_bg_teams_color_team "0"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_scoreboard_itemstats_doublerows "0"
seta hud_panel_strafehud_pos "0.330000 0.570000"
seta hud_panel_strafehud_size "0.340000 0.020000"
seta hud_panel_scoreboard_bg_teams_color_team "0.7"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_scoreboard_itemstats_doublerows "0"
seta hud_panel_strafehud_pos "0.380000 0.550000"
seta hud_panel_strafehud_size "0.240000 0.025000"
seta hud_panel_scoreboard_bg_teams_color_team "0.7"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_scoreboard_itemstats_doublerows "0"
seta hud_panel_strafehud_pos "0.330000 0.700000"
seta hud_panel_strafehud_size "0.340000 0.015000"
seta hud_panel_scoreboard_bg_teams_color_team "0.7"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_scoreboard_itemstats_doublerows "0"
seta hud_panel_strafehud_pos "0.320000 0.540000"
seta hud_panel_strafehud_size "0.360000 0.025000"
seta hud_panel_scoreboard_bg_teams_color_team "0.7"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_scoreboard_itemstats_doublerows "0"
seta hud_panel_strafehud_pos "0.360000 0.570000"
seta hud_panel_strafehud_size "0.280000 0.025000"
float autocvar_hud_panel_scoreboard_accuracy_showdelay = 2;
float autocvar_hud_panel_scoreboard_accuracy_showdelay_minpos = 0.75;
+bool autocvar_hud_panel_scoreboard_itemstats_doublerows = false;
+bool autocvar_hud_panel_scoreboard_itemstats_filter = true;
+
bool autocvar_hud_panel_scoreboard_dynamichud = false;
float autocvar_hud_panel_scoreboard_maxheight = 0.6;
return initial_pos + (end_pos - initial_pos) * scoreboard_acc_fade_alpha;
}
+.bool uninteresting;
+STATIC_INIT(default_order_items_label)
+{
+ IL_EACH(default_order_items, true, {
+ switch(it.netname)
+ {
+ case "bullets":
+ case "cells":
+ case "plasma":
+ case "rockets":
+ case "shells":
+ case "vaporizer_cells":
+ case "fuel":
+ case "armor_small":
+ case "armor_medium":
+ case "health_small":
+ case "health_medium":
+ it.uninteresting = true;
+ }
+ });
+}
+
vector Scoreboard_ItemStats_Draw(vector pos, vector rgb, vector bg_size)
{
float scoreboard_acc_fade_alpha_save = scoreboard_acc_fade_alpha; // debug
scoreboard_acc_fade_alpha = 1; // debug: make Item Stats always visible
float initial_posx = pos.x;
- int disownedcnt = 0;
- FOREACH(Items, true, {
+ int disowned_cnt = 0;
+ int uninteresting_cnt = 0;
+ IL_EACH(default_order_items, true, {
int q = g_inventory.inv_items[it.m_id];
//q = 1; // debug: display all items
- if (!q) ++disownedcnt;
+ if (autocvar_hud_panel_scoreboard_itemstats_filter && it.uninteresting)
+ ++uninteresting_cnt;
+ else if (!q)
+ ++disowned_cnt;
});
-
- int n = REGISTRY_COUNT(Items) - disownedcnt;
+ int items_cnt = REGISTRY_COUNT(Items) - uninteresting_cnt;
+ int n = items_cnt - disowned_cnt;
if (n <= 0) return pos;
- int rows = (autocvar_hud_panel_scoreboard_accuracy_doublerows && n >= floor(REGISTRY_COUNT(Items) / 2)) ? 2 : 1;
- int columnns = ceil(n / rows);
+ int rows = (autocvar_hud_panel_scoreboard_itemstats_doublerows && n >= floor(REGISTRY_COUNT(Items) / 2)) ? 2 : 1;
+ int columnns = max(6, ceil(n / rows));
float height = 40;
float fontsize = height * 1/3;
vector tmpos = pos;
int column = 0;
- IL_EACH(default_order_items, true, {
+ IL_EACH(default_order_items, !(autocvar_hud_panel_scoreboard_itemstats_filter && it.uninteresting), {
int n = g_inventory.inv_items[it.m_id];
//n = 1 + floor(i * 3 + 4.8) % 7; // debug: display a value for each item
if (n <= 0) continue;