From: terencehill Date: Fri, 5 Aug 2016 20:39:20 +0000 (+0200) Subject: Fix bad player name truncation position in the relative cell of the scoreboard X-Git-Tag: xonotic-v0.8.2~716^2~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8f30e696325ec85edc4bcfc52b27731d2a28871d;p=xonotic%2Fxonotic-data.pk3dir.git Fix bad player name truncation position in the relative cell of the scoreboard --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 34761ad89..711e236fd 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -716,14 +716,14 @@ string Scoreboard_FixColumnWidth(int i, string str) sbt_field_size[i] = namesize; if (sbt_fixcolumnwidth_iconlen != 0) - namesize -= sbt_fixcolumnwidth_marginlen + sbt_fixcolumnwidth_iconlen; + namesize -= sbt_fixcolumnwidth_marginlen + sbt_fixcolumnwidth_iconlen * hud_fontsize.x; str = textShortenToWidth(str, namesize, hud_fontsize, stringwidth_colors); sbt_fixcolumnwidth_len = stringwidth(str, true, hud_fontsize); } else sbt_fixcolumnwidth_len = stringwidth(str, false, hud_fontsize); - f = sbt_fixcolumnwidth_len + sbt_fixcolumnwidth_marginlen + sbt_fixcolumnwidth_iconlen; + f = sbt_fixcolumnwidth_len + sbt_fixcolumnwidth_marginlen + sbt_fixcolumnwidth_iconlen * hud_fontsize.x; if(sbt_field_size[i] < f) sbt_field_size[i] = f;