From 463ff1901fde8692ad8ff37c2a8ac47425708dd9 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 12 Feb 2017 12:01:54 +1000 Subject: [PATCH] Make checking of name a bit more reliable --- qcsrc/client/hud/panel/scoreboard.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 7ebf33722..a31893fc0 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1356,7 +1356,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz float namesize = 0; for(i = 0; i < RANKINGS_RECEIVED_CNT; ++i) { - float f = stringwidth(grecordholder[i], true, hud_fontsize); + float f = stringwidth(ColorTranslateRGB(grecordholder[i]), true, hud_fontsize); if(f > namesize) namesize = f; } @@ -1408,7 +1408,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz if (t == 0) continue; - if(grecordholder[i] == entcs_GetName(player_localnum)) + if(strdecolorize(grecordholder[i]) == strdecolorize(entcs_GetName(player_localnum))) drawfill(pos, columnsize, hl_rgb, sbt_highlight_alpha_self, DRAWFLAG_NORMAL); else if(!((j + column) & 1) && sbt_highlight) drawfill(pos, columnsize, hl_rgb, sbt_highlight_alpha, DRAWFLAG_NORMAL); @@ -1416,7 +1416,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz str = count_ordinal(i+1); drawstring(pos + text_ofs, str, hud_fontsize, '1 1 1', sbt_fg_alpha, DRAWFLAG_NORMAL); drawstring(pos + text_ofs + eX * ranksize, TIME_ENCODED_TOSTRING(t), hud_fontsize, '1 1 1', sbt_fg_alpha, DRAWFLAG_NORMAL); - str = grecordholder[i]; + str = ColorTranslateRGB(grecordholder[i]); if(cut) str = textShortenToWidth(str, namesize, hud_fontsize, stringwidth_colors); drawcolorcodedstring(pos + text_ofs + eX * (ranksize + timesize), str, hud_fontsize, sbt_fg_alpha, DRAWFLAG_NORMAL); -- 2.39.2