]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Campaign: don't display scoreboard player count or ReadyRestart notification
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 20 Oct 2022 15:30:31 +0000 (01:30 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 6 Jan 2023 07:16:11 +0000 (17:16 +1000)
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/server/command/vote.qc

index 9256d162bc83721c86c06e94f075a5fb4d81391f..c47d9611594a9b0daa6bd5a9a0a6e256412fef27 100644 (file)
@@ -2301,7 +2301,10 @@ 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 and player count
-               str = sprintf(_("^5%d^7/^5%d ^7players"), numplayers, srv_maxplayers ? srv_maxplayers : maxclients);
+               if (campaign)
+                       str = "";
+               else
+                       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
        }
index 4e05e681db3d48d8c37276dfe4339e4e895fcd9e..a5cc47e0a142a4f882f0270f6a61df80797bbdc2 100644 (file)
@@ -1404,7 +1404,7 @@ string GetVersionMessage(string hostversion, bool version_mismatch, bool version
 
 bool net_handle_ServerWelcome()
 {
-       bool campaign = ReadByte();
+       campaign = ReadByte();
        if (campaign)
        {
                string campaign_title = ReadString();
index 1f9e6a9a03e5aa1f78ef13dd78a8de13b79853ca..288a303ccad4008ab87f4902131381736ee5cb52 100644 (file)
@@ -105,6 +105,7 @@ float current_viewzoom;
 float zoomin_effect;
 bool warmup_stage;
 
+bool campaign;
 string hostname;
 string welcome_msg;
 int srv_minplayers;
index 53f9a1715604065e8f7d500125df0681e4b1c8f2..01c699a0c00f461568afdd5a917da8acddb0e2fe 100644 (file)
@@ -429,7 +429,7 @@ void ReadyRestart_force(bool is_fake_round_start)
 {
        if (time <= game_starttime && game_stopped)
                return;
-       if (!is_fake_round_start)
+       if (!is_fake_round_start && !autocvar_g_campaign)
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_COUNTDOWN_RESTART);
 
        VoteReset();