From: bones_was_here Date: Thu, 20 Oct 2022 15:30:31 +0000 (+1000) Subject: Campaign: don't display scoreboard player count or ReadyRestart notification X-Git-Tag: xonotic-v0.8.6~179^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fe344e52cf3895b466efad0491d6212720adeae3;p=xonotic%2Fxonotic-data.pk3dir.git Campaign: don't display scoreboard player count or ReadyRestart notification --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 9256d162b..c47d96115 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -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 } diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 4e05e681d..a5cc47e0a 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -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(); diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 1f9e6a9a0..288a303cc 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -105,6 +105,7 @@ float current_viewzoom; float zoomin_effect; bool warmup_stage; +bool campaign; string hostname; string welcome_msg; int srv_minplayers; diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 53f9a1715..01c699a0c 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -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();