}
float HUD_WouldDrawScoreboard() {
- if (scoreboard_showscores)
+ if (autocvar__hud_configure)
+ return 0;
+ else if (scoreboard_showscores)
return 1;
else if (intermission == 1)
return 1;
float padding;
padding = ((sbwidth/weapon_cnt) - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
- rgb = HUD_AccuracyColor(weapon_stats);
+ // yellow_accuracy = value at which accuracy becomes yellow
+ if(weapon_stats >= 100) {
+ rgb_x = 0;
+ rgb_y = 1;
+ }
+ else if(weapon_stats > autocvar_hud_weaponicons_accuracy_yellow) {
+ rgb_x = 1 - (weapon_stats-autocvar_hud_weaponicons_accuracy_yellow)/(100-autocvar_hud_weaponicons_accuracy_yellow); // red value between 1 -> 0
+ rgb_y = 1;
+ } else {
+ rgb_x = 1;
+ rgb_y = weapon_stats/autocvar_hud_weaponicons_accuracy_yellow; // green value between 0 -> 1
+ }
drawstring(pos + '1 0 0' * padding + '0 1 0' * height * (2/3), s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
}
pos_x += sbwidth/weapon_cnt * rows;