- drawcolorcodedstring(pos, str, hud_fontsize, sbt_fg_alpha, DRAWFLAG_NORMAL);
- pos.x += str_width + hud_fontsize.x * 0.5;
- pos.x += ping_padding;
+
+ vector name_pos = pos;
+ if((this_team == NUM_SPECTATOR) && autocvar_hud_panel_scoreboard_spectators_aligned)
+ name_pos.x += max(fieldsize, min_fieldsize) + 2 * fieldpadding + hud_fontsize.x * 0.25;
+ drawcolorcodedstring(name_pos, str, hud_fontsize, sbt_fg_alpha, DRAWFLAG_NORMAL);
+ if(field != "")
+ {
+ h_size.x = max(fieldsize, min_fieldsize) + 2 * fieldpadding;
+ h_size.y = hud_fontsize.y;
+ vector field_pos = pos;
+ if(!((this_team == NUM_SPECTATOR) && autocvar_hud_panel_scoreboard_spectators_aligned))
+ field_pos.x += column_width - h_size.x;
+ if(sbt_highlight)
+ drawfill(field_pos, h_size, '1 1 1', sbt_highlight_alpha, DRAWFLAG_NORMAL);
+ field_pos.x += fieldpadding + (max(fieldsize, min_fieldsize) - fieldsize) * 0.5;
+ drawstring(field_pos, field, hud_fontsize, sbt_field_rgb, sbt_fg_alpha, DRAWFLAG_NORMAL);
+ }
+ pos.x += column_width;
+ pos.x += hud_fontsize.x;