]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
And also move the countdowns for arena too
authorSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 21:19:19 +0000 (16:19 -0500)
committerSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 21:19:19 +0000 (16:19 -0500)
qcsrc/common/constants.qh
qcsrc/common/notifications.qh
qcsrc/server/arena.qc

index 70e6c154dcad94cd26b79aa611ea155e1d7a4b7e..e1562fb252c23666f4de2f863ca03fe8712a55f3 100644 (file)
@@ -378,7 +378,6 @@ float WATERLEVEL_SUBMERGED = 3;
 float MAX_SHOT_DISTANCE = 32768;
 
 //centerprint ID list
-float CPID_ROUND_STARTING = 6;
 float CPID_GAME_STARTING = 7;
 float CPID_TIMEOUT_COUNTDOWN = 8;
 float CPID_MOTD = 9;
index 140b4adef2b4ddd2440416583872f46030f5e3e3..b35e8aa682c38a656ad3c880bf2c2cff1d990640 100644 (file)
@@ -318,6 +318,9 @@ void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration,
        /*MSG_CENTER_NOTIF(1, CENTER_EMPTY,                                                     0, 0, "",                               NO_CPID,                                "0 0", "null", "")*/ \
        MSG_CENTER_NOTIF(1, CENTER_ASSAULT_ATTACKING,                           0, 0, "",                               CPID_ASSAULT_ROLE,              "0 0", _("^BGYou are attacking!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_ASSAULT_DEFENDING,                           0, 0, "",                               CPID_ASSAULT_ROLE,              "0 0", _("^BGYou are defending!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_ARENA_NEEDPLAYER,                            0, 0, "",                               CPID_ARENA,                             "2 0", _("^BGNeed at least 1 player in each team to play Clan Arena!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_ARENA_ROUNDSTART,                            0, 1, "",                               CPID_ARENA,                     "1 f1", _("^BGRound will start in ^COUNT"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_BEGIN,                                                       0, 0, "",                               NO_CPID,                                "2 0", _("^F4Begin!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_SHIELDED,          0, 0, "",                               CPID_CTF_CAPSHIELD,             "0 0", _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \
        MSG_CENTER_NOTIF(1, CENTER_CTF_CAPTURESHIELD_FREE,                      0, 0, "",                               CPID_CTF_CAPSHIELD,             "0 0", _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "") \
        MULTITEAM_CENTER(1, CENTER_CTF_PASS_OTHER_, 2,                          2, 0, "s1 s2",                  CPID_CTF_PASS,                  "0 0", _("^BG%s^BG passed the ^TC^TT^BG flag to %s"), "") \
index bb52a4ae25505d7ba4ec9de4914ecae2fa6299f8..58b9c9bd19d485538bd9ff04052fcc642a65a911 100644 (file)
@@ -200,7 +200,7 @@ void Arena_Warmup()
                if(warmup && time < warmup)
                {
                        FOR_EACH_REALCLIENT(e)
-                               Send_CSQC_Centerprint_Generic_Expire(e, CPID_ROUND_STARTING);
+                               Send_CSQC_Centerprint_Generic_Expire(e, CPID_ARENA);
                        warmup = 0;
                }
                if(champion && g_arena)
@@ -234,8 +234,7 @@ void Arena_Warmup()
                if(f != roundStartTime_prev) {
                        roundStartTime_prev = f;
                        if(g_ca && !(red_players && blue_players)) {
-                               FOR_EACH_REALCLIENT(self)
-                                       Send_CSQC_Centerprint_Generic(self, CPID_ROUND_STARTING, "^1Need at least 1 player in each team to play CA", 2, 0);
+                               Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_ARENA_NEEDPLAYER);
                                warmup = time + autocvar_g_ca_warmup;
                        } else {
                                if(f == 5)
@@ -247,8 +246,7 @@ void Arena_Warmup()
                                else if(f == 1)
                                        Announce("1");
 
-                               FOR_EACH_REALCLIENT(e)
-                                       Send_CSQC_Centerprint_Generic(e, CPID_ROUND_STARTING, "Round will start in %d", 1, f);
+                               Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_ARENA_ROUNDSTART, f);
                        }
                }
 
@@ -270,8 +268,7 @@ void Arena_Warmup()
                                reset_map(TRUE);
                } else {
                        Announce("begin");
-                       FOR_EACH_REALCLIENT(e)
-                               Send_CSQC_Centerprint_Generic(e, CPID_ROUND_STARTING, "^1Begin!", 1, 0);
+                       Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_BEGIN); 
                }
 
                if(g_arena) {