]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
move minstanex countdowns to notif system
authorSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 19:48:42 +0000 (14:48 -0500)
committerSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 19:48:42 +0000 (14:48 -0500)
qcsrc/common/constants.qh
qcsrc/common/notifications.qh
qcsrc/server/w_minstanex.qc

index e4d00825af49fb2d4c937759c583ae3a2ab887d1..11d88cfc8e2885e1bd12bc664402a1c9fbeb08a9 100644 (file)
@@ -379,7 +379,6 @@ float MAX_SHOT_DISTANCE = 32768;
 
 //centerprint ID list
 float CPID_CTF_CAPTURESHIELD = 2;
-float CPID_MINSTA_FINDAMMO = 3;
 float CPID_NIX_WPNCHANGE = 4;
 float CPID_ROUND_STARTING = 6;
 float CPID_GAME_STARTING = 7;
index f7a1884f55470dccfad9e806f7b2dc5fdc1573a3..257e007ea1fe97f77c0f788ae8ab076f6fd65c25 100644 (file)
@@ -387,6 +387,8 @@ void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration,
        MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_PICKUP,                                     1, 0, "s1",                     CPID_KEEPAWAY,                  "0 0", _("^BG%s^BG has picked up the ball!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_WARN,                                       0, 0, "",                               CPID_KA_WARN,                   "0 0", _("^BGKilling people while you don't have the ball gives no points!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_LMS_CAMPCHECK,                                       0, 0, "",                               CPID_LMS_CAMP,                  "0 0", _("^K1Don't camp!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_MINSTA_FINDAMMO,                                     0, 0, "",                               CPID_MINSTA_FINDAMMO,   "1 9", _("^K1^COUNT^BG left to find some ammo!"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_MINSTA_FINDAMMO_FIRST,                       0, 0, "",                               CPID_MINSTA_FINDAMMO,   "1 10", _("Get some ammo or you'll be dead in ^K1^COUNT^BG!"), _("Get some ammo! ^K1^COUNT^BG left!")) \
        MSG_CENTER_NOTIF(1, CENTER_JOIN_NOSPAWNS,                                       0, 0, "",                               CPID_PREVENT_JOIN,              "0 0", _("^K1No spawnpoints available!\nHope your team can fix it..."), "") \
        MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT,                                        0, 0, "",                               CPID_PREVENT_JOIN,              "0 0", _("^K1You may not join the game at this time.\nThe player limit reached maximum capacity."), "") \
        MSG_CENTER_NOTIF(1, CENTER_OVERTIME_TIME,                                       0, 1, "f1time",                 CPID_OVERTIME,                  "0 0", _("^F2Now playing ^F4OVERTIME^F2!\nAdded ^F4%s ^F2minute(s) to the game!"), "") \
index dae7003be5add2ccbd1ae6b3d43ea37f1a918c00..5013890bfe3ea5bf5c488c86a15b6b312f329da3 100644 (file)
@@ -150,13 +150,13 @@ void minstagib_ammocheck(void)
                }
                else if (self.health == 90)
                {
-                       Send_CSQC_Centerprint_Generic(self, CPID_MINSTA_FINDAMMO, "^1%d^7 seconds left to find some ammo", 1, 9);
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_MINSTA_FINDAMMO);
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "9");
                }
                else if (self.health == 100)
                {
-                       Send_CSQC_Centerprint_Generic(self, CPID_MINSTA_FINDAMMO, "get some ammo or\nyou'll be dead in ^3%d^7 seconds...", 1, 10);
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_MINSTA_FINDAMMO_FIRST);
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        if not(self.flags & FL_GODMODE)
                                AnnounceTo(self, "10");