]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix incorrect scoreboard layout with certain configs
authorterencehill <piuntn@gmail.com>
Fri, 13 Aug 2010 15:27:03 +0000 (17:27 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 13 Aug 2010 15:27:03 +0000 (17:27 +0200)
Examples:
scoreboard_columns_set  name ping | score   -->  the fields ping and score overlap
scoreboard_columns_set  name ping score |   -->  the field score goes beyond the scoreboard table

This bug was introduced by the utf8 related changes.

qcsrc/client/scoreboard.qc

index 29fb20642a90fbb514f7a1244c0d79b4541b1dcb..fa346215762a8f8b49cbf8ee3f5edd20981d00a2 100644 (file)
@@ -595,8 +595,8 @@ string HUD_FixScoreboardColumnWidth(float i, string str)
                for(j = 0; j < hud_num_fields; ++j)
                        if(j != i)
                                if (hud_field[i] != SP_SEPARATOR)
-                                       namesize -= hud_size[j] + 1;
-               namesize += 1;
+                                       namesize -= hud_size[j] + hud_fontsize_x;
+               namesize += hud_fontsize_x;
                hud_size[i] = namesize;
 
                if (hud_fixscoreboardcolumnwidth_iconlen != 0)