seta hud_panel_infomessages_group_fadetime 0.4 "group message fade in/out time"
seta hud_panel_scoreboard_namesize "15" "size limit of player names and relative column (multiplied by fontsize)"
-seta hud_panel_scoreboard_maxrows 1 "limit number of rows displayed in the scoreboard; other players are listed in the last row"
-seta hud_panel_scoreboard_maxrows_players 20 "max number of rows in non-team games"
-seta hud_panel_scoreboard_maxrows_teamplayers 9 "max number of rows in the team table"
-seta hud_panel_scoreboard_others_showscore 1 "show scores of other players in the last row"
+seta hud_panel_scoreboard_maxheight 0.5 "max height of the scoreboard; a few players that wouldn't fit into the scoreboard are listed in the last row"
+seta hud_panel_scoreboard_others_showscore 1 "show scores of players listed in the last row when the scoreboard reaches the max height"
seta hud_panel_scoreboard_spectators_showping 1 "show ping of spectators"
// hud panel aliases
bool autocvar_hud_panel_scoreboard_dynamichud = false;
-bool autocvar_hud_panel_scoreboard_maxrows = true;
-int autocvar_hud_panel_scoreboard_maxrows_players = 20;
-int autocvar_hud_panel_scoreboard_maxrows_teamplayers = 9;
+bool autocvar_hud_panel_scoreboard_maxheight = 0.5;
bool autocvar_hud_panel_scoreboard_others_showscore = true;
bool autocvar_hud_panel_scoreboard_spectators_showping = true;
vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size)
{
int max_players = 999;
- if(autocvar_hud_panel_scoreboard_maxrows)
+ if(autocvar_hud_panel_scoreboard_maxheight > 0)
{
+ max_players = autocvar_hud_panel_scoreboard_maxheight * vid_conheight;
if(teamplay)
- max_players = autocvar_hud_panel_scoreboard_maxrows_teamplayers;
- else
- max_players = autocvar_hud_panel_scoreboard_maxrows_players;
+ max_players = (max_players - hud_fontsize.y * 1.25 - panel_bg_padding * 2) / 2;
+ max_players = floor(max_players / (hud_fontsize.y * 1.25));
if(max_players <= 1)
max_players = 1;
if(max_players == tm.team_size)