Scoreboard: show number of spectators
authorterencehill <piuntn@gmail.com>
Wed, 14 Sep 2016 09:20:22 +0000 (11:20 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 14 Sep 2016 09:20:22 +0000 (11:20 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 5e48bc3..52814ac 100644 (file)
@@ -1544,8 +1544,12 @@ void Scoreboard_Draw()
        {
                if(pl.team == NUM_SPECTATOR)
                {
+                       for(tm = teams.sort_next; tm; tm = tm.sort_next)
+                               if(tm.team == NUM_SPECTATOR)
+                                       break;
+                       str = sprintf("%s (%d)", _("Spectators"), tm.team_size);
                        draw_beginBoldFont();
-                       drawstring(pos, _("Spectators"), hud_fontsize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring(pos, str, hud_fontsize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                        draw_endBoldFont();
                        pos.y += 1.25 * hud_fontsize.y;