]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert admin message & trigger messages
authorMario <mario.mario@y7mail.com>
Fri, 13 Sep 2013 03:56:32 +0000 (13:56 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 13 Sep 2013 03:56:32 +0000 (13:56 +1000)
qcsrc/common/notifications.qh
qcsrc/server/command/sv_cmd.qc
qcsrc/server/g_triggers.qc
qcsrc/server/item_key.qc
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/secret.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc

index 122755b15adf00e7e21416409b4f5c1710687302..115edac10039c46e6413e87874a6d189f2565962 100644 (file)
@@ -327,7 +327,6 @@ void Send_Notification_WOCOVA(
                MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
        #endif
 #define MSG_INFO_NOTIFICATIONS \
-       MSG_INFO_NOTIF(2, INFO_ADMINMESSAGE,                   2, 0, "s1 s2", "",                       "",                     _("^F2%s^BG: %s"), "") \
        MSG_INFO_NOTIF(2, INFO_COINTOSS,                       1, 0, "s1", "",                          "",                     _("^F2Throwing coin... Result: %s^F2!"), "") \
        MSG_INFO_NOTIF(1, INFO_JETPACK_NOFUEL,                 0, 0, "", "",                            "",                     _("^BGYou don't have any fuel for the ^F1Jetpack"), "") \
        MSG_INFO_NOTIF(2, INFO_SUPERSPEC_MISSING_UID,          0, 0, "", "",                            "",                     _("^F2You lack a UID, superspec options will not be saved/restored"), "") \
@@ -519,7 +518,6 @@ void Send_Notification_WOCOVA(
                MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
        #endif
 #define MSG_CENTER_NOTIFICATIONS \
-       MSG_CENTER_NOTIF(1, CENTER_ADMINMESSAGE,                2, 0, "s1 s2",        NO_CPID,             "3 0", _("^F2%s^BG:\n^BG%s"), "") \
        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_COUNTDOWN_BEGIN,             0, 0, "",             CPID_ROUND,          "2 0", _("^F4Begin!"), "") \
@@ -659,8 +657,7 @@ void Send_Notification_WOCOVA(
        MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SPECTATE,         0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Spectating in ^COUNT"), "") \
        MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE,          0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Suicide in ^COUNT"), "") \
        MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING,           0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
-       MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "") \
-       MSG_CENTER_NOTIF(1, CENTER_TRIGGER,                     1, 0, "s1",            NO_CPID,               "0 0",  _("^BG%s"), "") 
+       MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "") 
 
 #define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
        MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
@@ -743,7 +740,6 @@ void Send_Notification_WOCOVA(
        MSG_MULTI_NOTIF(1, ITEM_WEAPON_NOAMMO,                   NO_MSG,        INFO_ITEM_WEAPON_NOAMMO,                   CENTER_ITEM_WEAPON_NOAMMO) \
        MSG_MULTI_NOTIF(1, ITEM_WEAPON_PRIMORSEC,                NO_MSG,        INFO_ITEM_WEAPON_PRIMORSEC,                CENTER_ITEM_WEAPON_PRIMORSEC) \
        MSG_MULTI_NOTIF(1, ITEM_WEAPON_UNAVAILABLE,              NO_MSG,        INFO_ITEM_WEAPON_UNAVAILABLE,              CENTER_ITEM_WEAPON_UNAVAILABLE) \
-       MSG_MULTI_NOTIF(1, MULTI_ADMINMESSAGE,                   NO_MSG,        INFO_ADMINMESSAGE,                         CENTER_ADMINMESSAGE) \
        MSG_MULTI_NOTIF(1, MULTI_COINTOSS,                       NO_MSG,        INFO_COINTOSS,                             CENTER_COINTOSS) \
        MSG_MULTI_NOTIF(1, MULTI_COUNTDOWN_BEGIN,                ANNCE_BEGIN,   NO_MSG,                                    CENTER_COUNTDOWN_BEGIN) \
        MSG_MULTI_NOTIF(1, MULTI_MINSTA_FINDAMMO,                ANNCE_NUM_10,  NO_MSG,                                    CENTER_MINSTA_FINDAMMO_FIRST) \
index 282ada65122f797c4d7d0fc7ec273599624831d9..1a6a5513cb811b2fc62551bd03f6e365aaa69841 100644 (file)
@@ -106,7 +106,8 @@ void GameCommand_adminmsg(float request, float argc)
                                        }
                                        else
                                        {
-                                               Send_Notification(NOTIF_ONE_ONLY, client, MSG_MULTI, MULTI_ADMINMESSAGE, admin_name(), admin_message);
+                                               centerprint(client, strcat("^3", admin_name(), ":\n^7", admin_message));
+                                               sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", admin_message, "\n"));
                                        }
                                        
                                        successful = strcat(successful, (successful ? ", " : ""), client.netname);
index 725eb9b1ab5fc26b05baa4329696e20a2f693e3c..4c24ed60650bd574283744814918241081eb07a2 100644 (file)
@@ -64,7 +64,7 @@ void SUB_UseTargets()
        if(IS_PLAYER(activator) && self.message != "")
        if(IS_REAL_CLIENT(activator))
        {
-               Send_Notification(NOTIF_ONE, activator, MSG_CENTER, CENTER_TRIGGER, self.message);
+               centerprint(activator, self.message);
                if (self.noise == "")
                        play2(activator, "misc/talk.wav");
        }
index 59cd9129af298650b354f461449772650435facb..08429ca6f08816a6d4365b264d6daee28d9b63b5 100644 (file)
@@ -73,7 +73,7 @@ void item_key_touch(void) {
        other.itemkeys |= self.itemkeys;
        play2(other, self.noise);
        
-       Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.message);
+       centerprint(other, self.message);
 };
 
 /**
@@ -352,7 +352,7 @@ void trigger_keylock_touch(void) {
        } else {
                // all keys were given!
                play2(other, self.noise);
-               Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.message);
+               centerprint(other, self.message);
                
                if (self.target)
                        trigger_keylock_trigger(self.target);
index dddec6ec65708e93495848d82cd02b97dea9d428..fa12b8bdb3dd0624564faf2a9ecf5948e6fba55c 100644 (file)
@@ -63,12 +63,13 @@ void assault_objective_decrease_use()
                        PlayerTeamScore_Add(activator, SP_ASSAULT_OBJECTIVES, ST_ASSAULT_OBJECTIVES, 1);
                        self.enemy.health = -1;
 
-                       entity oldself, oldactivator;
+                       entity oldself, oldactivator, head;
 
                        oldself = self;
                        self = oldself.enemy;
                        if(self.message)
-                               Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_TRIGGER, self.message);
+                       FOR_EACH_PLAYER(head)
+                               centerprint(head, self.message);
 
                        oldactivator = activator;
                        activator = oldself;
index 47f849f24b35dd9f833874f448c1b0c3532684be..9af13eca28df58d6860bce3edda0c856efd20f66 100644 (file)
@@ -19,7 +19,7 @@ void trigger_secret_touch() {
        //print(ftos(secret_counter.count), "\n");
 
        // centerprint message (multi_touch() doesn't always call centerprint())
-       Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.message);
+       centerprint(other, self.message);
        self.message = "";
        
        // handle normal trigger features
index 6d9ec73954613b5456c0b34e4c8e7091dd54f0e5..ac8102f00047ea723820e9c9d21eb22525b596fd 100644 (file)
@@ -1494,7 +1494,7 @@ void target_items_use (void)
                        remove(e);
 
        if(GiveItems(activator, 0, tokenize_console(self.netname)))
-               Send_Notification(NOTIF_ONE, activator, MSG_CENTER, CENTER_TRIGGER, self.message);
+               centerprint(activator, self.message);
 }
 
 void spawnfunc_target_items (void)
index 067e889d0b2173af93d96b77a105717767cbb88c..3c797f97710e46b6d99e44164816554b122a3d3c 100644 (file)
@@ -195,7 +195,7 @@ void trigger_push_touch()
                        if(IS_REAL_CLIENT(other))
                        {
                                if(self.message)
-                                       Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.message);
+                                       centerprint(other, self.message);
                        }
                        else
                                other.lastteleporttime = time;
index affed93c80b5e54529d9b5d51928746cfbe8b7c1..df21bdecd4efa68d916306d65d8ff53e61cdf628 100644 (file)
@@ -1068,7 +1068,7 @@ void door_touch()
        if (!(self.owner.dmg) && (self.owner.message != ""))
        {
                if (IS_CLIENT(other))
-                       Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.owner.message);
+                       centerprint(other, self.message);
                play2(other, "misc/talk.wav");
        }
 }
@@ -1741,7 +1741,7 @@ void secret_touch()
        if (self.message)
        {
                if (IS_CLIENT(other))
-                       Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_TRIGGER, self.message);
+                       centerprint(other, self.message);
                play2(other, "misc/talk.wav");
        }
 }