From 618b27c49c9370497f003c7d8e816ed85c41ec77 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 26 Nov 2016 02:35:20 +0100 Subject: [PATCH] Fix hud_panel_scoreboard_maxheight --- qcsrc/client/hud/panel/scoreboard.qc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 934fe7106..284fbf792 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1009,10 +1009,16 @@ vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size) int max_players = 999; if(autocvar_hud_panel_scoreboard_maxheight > 0) { - max_players = autocvar_hud_panel_scoreboard_maxheight * vid_conheight; + float height = autocvar_hud_panel_scoreboard_maxheight * vid_conheight; if(teamplay) - max_players = (max_players - hud_fontsize.y * 1.25 - panel_bg_padding * 2) / 2; - max_players = floor(max_players / (hud_fontsize.y * 1.25)); + { + height -= (panel_bg_padding * 2 + hud_fontsize.y * 1.25) * team_count; // - padding and header + height -= hud_fontsize.y * (team_count - 1); // - spacing between tables + height /= team_count; + } + else + height -= panel_bg_padding * 2; // - padding + max_players = floor(height / (hud_fontsize.y * 1.25)); if(max_players <= 1) max_players = 1; if(max_players == tm.team_size) -- 2.39.2