From 6edb557eb997d0f350c73d314c0b5b3fda09f219 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Tue, 26 Feb 2013 16:19:19 -0500 Subject: [PATCH] And also move the countdowns for arena too --- qcsrc/common/constants.qh | 1 - qcsrc/common/notifications.qh | 3 +++ qcsrc/server/arena.qc | 11 ++++------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 70e6c154d..e1562fb25 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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; diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 140b4adef..b35e8aa68 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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"), "") \ diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index bb52a4ae2..58b9c9bd1 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -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) { -- 2.39.2