From 0315148a7932523108e2783df88e29d6c9d3e07b Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 13 Sep 2013 13:56:32 +1000 Subject: [PATCH] Revert admin message & trigger messages --- qcsrc/common/notifications.qh | 6 +----- qcsrc/server/command/sv_cmd.qc | 3 ++- qcsrc/server/g_triggers.qc | 2 +- qcsrc/server/item_key.qc | 4 ++-- qcsrc/server/mutators/gamemode_assault.qc | 5 +++-- qcsrc/server/secret.qc | 2 +- qcsrc/server/t_items.qc | 2 +- qcsrc/server/t_jumppads.qc | 2 +- qcsrc/server/t_plats.qc | 4 ++-- 9 files changed, 14 insertions(+), 16 deletions(-) diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 122755b15..115edac10 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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) \ diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 282ada651..1a6a5513c 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -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); diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index 725eb9b1a..4c24ed606 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -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"); } diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 59cd9129a..08429ca6f 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -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); diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/gamemode_assault.qc index dddec6ec6..fa12b8bdb 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/gamemode_assault.qc @@ -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; diff --git a/qcsrc/server/secret.qc b/qcsrc/server/secret.qc index 47f849f24..9af13eca2 100644 --- a/qcsrc/server/secret.qc +++ b/qcsrc/server/secret.qc @@ -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 diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 6d9ec7395..ac8102f00 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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) diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 067e889d0..3c797f977 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -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; diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index affed93c8..df21bdecd 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -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"); } } -- 2.39.2