]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Key Hunt: show a centerprint message when a team wins or loses
authorterencehill <piuntn@gmail.com>
Thu, 8 Dec 2016 16:49:30 +0000 (17:49 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 8 Dec 2016 16:49:30 +0000 (17:49 +0100)
qcsrc/common/notifications/all.inc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc

index 4cb210fef1ac9168327e86e75bf12a6c481b5c08..e403baab3c6806951badd92ef8e8b5e05aba5beb 100644 (file)
 
     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"), "")
 
index 341d0b207bc49b6b9fa9b77aa528cfbe29060205..529a912f6960605ec293cdbc4e4770cdd1b89ed9 100644 (file)
@@ -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