]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 5e48bc371e8ae26a5d32997599b5c35794de35b7..52814acb08e91720c69d7cf9b2cbcfeac378ffa8 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;