From 8a67cc38756392786ec094865548b59a0a8577e0 Mon Sep 17 00:00:00 2001 From: z411 Date: Thu, 15 Apr 2021 13:17:27 -0400 Subject: [PATCH] Add country flags for spectators/other players --- qcsrc/client/hud/panel/scoreboard.qc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 1dd00cc66..8100e0f8b 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1061,6 +1061,7 @@ vector Scoreboard_DrawOthers(vector item_pos, vector rgb, int this_team, entity int i = 0; vector h_pos = item_pos; vector h_size = vec2(panel_size.x, hud_fontsize.y * 1.25); + vector sz, f_size; bool complete = (this_team == NUM_SPECTATOR); @@ -1136,9 +1137,19 @@ vector Scoreboard_DrawOthers(vector item_pos, vector rgb, int this_team, entity } } + Scoreboard_GetField(pl, SP_COUNTRY); + if(sbt_field_icon3 != "") { + sz = draw_getimagesize(sbt_field_icon3); + f_size = vec2(hud_fontsize.x * (sz.x / sz.y), hud_fontsize.y); + + drawpic(pos, sbt_field_icon3, f_size, sbt_field_icon1_rgb, sbt_fg_alpha, DRAWFLAG_NORMAL); + pos.x += f_size.x + hud_fontsize.x * 0.5; + } + 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 != "") { -- 2.39.2