]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Display current and maximum player numbers on scoreboard
authorbones_was_here <bones_was_here@xonotic.au>
Mon, 26 Sep 2022 05:22:57 +0000 (15:22 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 28 Sep 2022 20:00:35 +0000 (06:00 +1000)
qcsrc/client/hud/panel/scoreboard.qc

index cec3575f11954c9a69fcc5e7866e0b5f8528b79b..727fc411be32e111647544076b574e410d2baf2b 100644 (file)
@@ -2332,8 +2332,9 @@ void Scoreboard_Draw()
                        }
                }
                drawcolorcodedstring(pos + '1 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align right
-               // map name
-               str = sprintf(_("^7Map: ^2%s"), mi_shortname);
+               // map name and player count
+               str = sprintf(_("^5%d^7/^5%d ^7players"), numplayers, srv_maxplayers ? srv_maxplayers : maxclients);
+               str = strcat("^7", _("Map:"), " ^2", mi_shortname, "    ", str); // reusing "Map:" translatable string
                drawcolorcodedstring(pos, str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align left
        }
        // End of Game Info Section