]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/world.qc
Merge branch 'z411/bai-server' into LegendaryGuard/bai_mod
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qc
index f46194fa44c9c344b43c7206fc5ec50b11fa06fc..34c811f12f29712250d20bf327802730826be5db 100644 (file)
@@ -1456,7 +1456,13 @@ void AnnounceNewLeader()
                if (WinningConditionHelper_equality)
                        Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_TEAM_LEADS_TIED);
                else
-                       Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, APP_TEAM_NUM(WinningConditionHelper_winnerteam, ANNCE_TEAM_LEADS));
+                       FOREACH_CLIENT(IS_PLAYER(it), {
+                               if(it.team == WinningConditionHelper_winnerteam)
+                                       Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_LEADS_TEAM);
+                               else
+                                       Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_LEADS_ENEMY);
+                       });
+                       Send_Notification(NOTIF_ALL_SPEC, NULL, MSG_ANNCE, APP_TEAM_NUM(WinningConditionHelper_winnerteam, ANNCE_TEAM_LEADS));
        } else {
                if (WinningConditionHelper_equality)
                {
@@ -1471,6 +1477,22 @@ void AnnounceNewLeader()
        }
 }
 
+void AnnounceScores(float tm)
+{
+       WinningConditionHelper(NULL);
+       if (Score_NewLeader()) {
+               AnnounceNewLeader();
+       } else {
+               FOREACH_CLIENT(IS_PLAYER(it), {
+                       if(it.team == tm)
+                               Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_SCORES_TEAM);
+                       else
+                               Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_SCORES_ENEMY);
+               });
+               Send_Notification(NOTIF_ALL_SPEC, NULL, MSG_ANNCE, APP_TEAM_NUM(tm, ANNCE_TEAM_SCORES));
+       }
+}
+
 float WinningCondition_Scores(float limit, float leadlimit)
 {
        // TODO make everything use THIS winning condition (except LMS)