]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Key Hunt: add more detailed notifications when a key gets destroyed
authorterencehill <piuntn@gmail.com>
Wed, 7 Dec 2016 23:35:48 +0000 (00:35 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 7 Dec 2016 23:35:48 +0000 (00:35 +0100)
qcsrc/common/notifications/all.inc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc

index a6431cf673810c1625552fc2418c644738c3e8ad..4cb210fef1ac9168327e86e75bf12a6c481b5c08 100644 (file)
     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"), "")
index 28e43c0855b5608939d586e74e5515ccb56e2908..341d0b207bc49b6b9fa9b77aa528cfbe29060205 100644 (file)
@@ -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);