From: terencehill <piuntn@gmail.com>
Date: Fri, 13 Aug 2010 15:27:03 +0000 (+0200)
Subject: Fix incorrect scoreboard layout with certain configs
X-Git-Tag: xonotic-v0.1.0preview~341^2~7
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bae013ccca31b1443847a59507b4cb840a2a49f4;p=xonotic%2Fxonotic-data.pk3dir.git

Fix incorrect scoreboard layout with certain configs
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.
---

diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc
index 29fb20642a..fa34621576 100644
--- a/qcsrc/client/scoreboard.qc
+++ b/qcsrc/client/scoreboard.qc
@@ -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)