Fix scoreboard layout when changing hud_fontsize 366/head
authorterencehill <piuntn@gmail.com>
Thu, 8 Sep 2016 20:48:50 +0000 (22:48 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 8 Sep 2016 20:48:50 +0000 (22:48 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 58e962e..5e48bc3 100644 (file)
@@ -756,7 +756,10 @@ string Scoreboard_FixColumnWidth(int i, string str)
 void Scoreboard_initFieldSizes()
 {
        for(int i = 0; i < sbt_num_fields; ++i)
+       {
+               sbt_field_size[i] = stringwidth(sbt_field_title[i], false, hud_fontsize);
                Scoreboard_FixColumnWidth(i, "");
+       }
 }
 
 vector Scoreboard_DrawHeader(vector pos, vector rgb, bool other_players)