]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bad player name truncation position in the relative cell of the scoreboard
authorterencehill <piuntn@gmail.com>
Fri, 5 Aug 2016 20:39:20 +0000 (22:39 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 5 Aug 2016 20:39:20 +0000 (22:39 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 34761ad89ef386f54b082615c6901e2f4c2621af..711e236fd0cd9cdd9358a31edf3a956eb4e75a80 100644 (file)
@@ -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;