From 8931a6369999af76f198cf7fe88b136684a852ff Mon Sep 17 00:00:00 2001 From: z411 Date: Sat, 5 Sep 2020 17:31:51 -0400 Subject: [PATCH] Added Ready notification --- qcsrc/common/notifications/all.inc | 1 + qcsrc/common/notifications/all.qh | 1 + qcsrc/server/client.qc | 4 ++++ qcsrc/server/command/vote.qc | 5 ++++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index a3eeb6d27..d9f2428d6 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -730,6 +730,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_CENTER_NOTIF(MISSING_TEAMS, N_ENABLE, 0, 1, "missing_teams", CPID_MISSING_TEAMS, "-1 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "") MSG_CENTER_NOTIF(MISSING_PLAYERS, N_ENABLE, 0, 1, "f1", CPID_MISSING_PLAYERS, "-1 0", _("^BGWaiting for %s player(s) to join..."), "") + MSG_CENTER_NOTIF(MISSING_READY, N_ENABLE, 0, 0, "", CPID_MISSING_READY, "-1 0", _("^BGThe match will begin\nwhen more players are ready.\n\nPress ^F2F4^BG to get ready"), "") MSG_CENTER_NOTIF(INSTAGIB_DOWNGRADE, N_ENABLE, 0, 0, "", CPID_INSTAGIB_FINDAMMO, "5 0", _("^BGYour weapon has been downgraded until you find some ammo!"), "") MSG_CENTER_NOTIF(INSTAGIB_FINDAMMO, N_ENABLE, 0, 0, "", CPID_INSTAGIB_FINDAMMO, "1 9", _("^F4^COUNT^BG left to find some ammo!"), "") diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 481154f3e..b1e26a2be 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -64,6 +64,7 @@ ENUMCLASS(CPID) CASE(CPID, LMS) CASE(CPID, MISSING_TEAMS) CASE(CPID, MISSING_PLAYERS) + CASE(CPID, MISSING_READY) CASE(CPID, INSTAGIB_FINDAMMO) CASE(CPID, CAMPAIGN_MESSAGE) CASE(CPID, MOTD) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index ea18ed479..e4a6e72a6 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2074,6 +2074,10 @@ void Join(entity this) else Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_JOIN_PLAY, this.netname); this.team_selected = false; + + // z411 + if(warmup_stage) + Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_MISSING_READY); } int GetPlayerLimit() diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index ee8a8e8db..8e49a653d 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -448,7 +448,10 @@ void ReadyRestart_force() warmup_stage = 0; // once the game is restarted the game is in match stage // reset the .ready status of all players (also spectators) - FOREACH_CLIENT(IS_REAL_CLIENT(it), { it.ready = false; }); + FOREACH_CLIENT(IS_REAL_CLIENT(it), { + it.ready = false; + Kill_Notification(NOTIF_ONE_ONLY, it, MSG_CENTER, CPID_MISSING_READY); + }); readycount = 0; Nagger_ReadyCounted(); // NOTE: this causes a resend of that entity, and will also turn off warmup state on the client -- 2.39.2