From a9cbb4dcb7b3270ddbd39fa729485c91d2ceafcf Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 8 Dec 2016 17:49:30 +0100 Subject: [PATCH] Key Hunt: show a centerprint message when a team wins or loses --- qcsrc/common/notifications/all.inc | 1 + qcsrc/server/mutators/mutator/gamemode_keyhunt.qc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index 4cb210fef..e403baab3 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -650,6 +650,7 @@ MSG_CENTER_NOTIF(GENERATOR_UNDERATTACK, 1, 0, 0, "", CPID_Null, "0 0", _("^BGThe generator is under attack!"), "") + MULTITEAM_CENTER(ROUND_TEAM_LOSS, 4, 1, 0, 0, "", CPID_ROUND, "0 0", _("^TC^TT^BG team loses the round"), "", NAME) MULTITEAM_CENTER(ROUND_TEAM_WIN, 4, 1, 0, 0, "", CPID_ROUND, "0 0", _("^TC^TT^BG team wins the round"), "", NAME) MSG_CENTER_NOTIF(ROUND_PLAYER_WIN, 1, 1, 0, "s1", CPID_ROUND, "0 0", _("^BG%s^BG wins the round"), "") diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index 341d0b207..529a912f6 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -545,6 +545,7 @@ void kh_WinnerTeam(int winner_team) // runs when a team wins first = false; } + Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN)); Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_KEYHUNT_CAPTURE), keyowner); first = true; @@ -647,6 +648,7 @@ void kh_LoserTeam(int loser_team, entity lostkey) // runs when a player pushes } int realteam = kh_Team_ByID(lostkey.count); + Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, APP_TEAM_NUM(loser_team, CENTER_ROUND_TEAM_LOSS)); if(attacker) Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(realteam, INFO_KEYHUNT_PUSHED), attacker.netname, lostkey.kh_previous_owner.netname); else -- 2.39.2