]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added Ready notification
authorz411 <z411@omaera.org>
Sat, 5 Sep 2020 21:31:51 +0000 (17:31 -0400)
committerz411 <z411@omaera.org>
Sat, 5 Sep 2020 21:31:51 +0000 (17:31 -0400)
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/server/client.qc
qcsrc/server/command/vote.qc

index a3eeb6d27ea860af7322f671588955eebb990bd0..d9f2428d69b1a2634e12b1105bdc0e807c304e63 100644 (file)
@@ -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!"), "")
index 481154f3e6ad207fdb4e6d05140273a4d7d0c9cc..b1e26a2be67a4074e34e90c75346cf4d78da293c 100644 (file)
@@ -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)
index ea18ed47949e9c5e9f10e399520598e1a012a026..e4a6e72a6eb258d1bc053a7905eb7abacd9bf9ee 100644 (file)
@@ -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()
index ee8a8e8db9a1550ec56cd407d3d2d0e05d6ccede..8e49a653d642f03473f9984c43643d7c026e6e6e 100644 (file)
@@ -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