From 0d51d7e2ddffb5d3a95d995cf2b150ea73f9704a Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 8 Dec 2016 00:35:48 +0100 Subject: [PATCH] Key Hunt: add more detailed notifications when a key gets destroyed --- qcsrc/common/notifications/all.inc | 2 ++ qcsrc/server/mutators/mutator/gamemode_keyhunt.qc | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index a6431cf67..4cb210fef 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -380,6 +380,8 @@ MULTITEAM_INFO(KEYHUNT_CAPTURE, 4, 1, 1, 0, "s1", "", "", _("^BG%s^BG captured the keys for the ^TC^TT team"), "", NAME) MULTITEAM_INFO(KEYHUNT_DROP, 4, 1, 1, 0, "s1", "", "", _("^BG%s^BG dropped the ^TC^TT Key"), "", KEY) MULTITEAM_INFO(KEYHUNT_LOST, 4, 1, 1, 0, "s1", "", "", _("^BG%s^BG lost the ^TC^TT Key"), "", KEY) + MULTITEAM_INFO(KEYHUNT_PUSHED, 4, 1, 2, 0, "s1 s2", "", "", _("^BG%s^BG pushed %s^BG causing the ^TC^TT Key ^BGdestruction"), "", KEY) + MULTITEAM_INFO(KEYHUNT_DESTROYED, 4, 1, 1, 0, "s1", "", "", _("^BG%s^BG destroyed the ^TC^TT Key"), "", KEY) MULTITEAM_INFO(KEYHUNT_PICKUP, 4, 1, 1, 0, "s1", "", "", _("^BG%s^BG picked up the ^TC^TT Key"), "", KEY) MSG_INFO_NOTIF(LMS_FORFEIT, 1, 1, 0, "s1", "", "", _("^BG%s^F3 forfeited"), "") diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index 28e43c085..341d0b207 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -647,7 +647,10 @@ 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_INFO, APP_TEAM_NUM(realteam, INFO_KEYHUNT_LOST), lostkey.kh_previous_owner.netname); + if(attacker) + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(realteam, INFO_KEYHUNT_PUSHED), attacker.netname, lostkey.kh_previous_owner.netname); + else + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(realteam, INFO_KEYHUNT_DESTROYED), lostkey.kh_previous_owner.netname); play2all(SND(KH_DESTROY)); te_tarexplosion(lostkey.origin); -- 2.39.2