]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Wait until relative announcing merge
authorz411 <z411@omaera.org>
Mon, 30 Jan 2023 11:05:05 +0000 (08:05 -0300)
committerz411 <z411@omaera.org>
Mon, 30 Jan 2023 11:05:05 +0000 (08:05 -0300)
qcsrc/common/notifications/all.inc
qcsrc/server/world.qc

index 85fdcd5144bf1175e582db49ad6d26a7cf7233e1..0fe37893b4a614c7771398d9a43eee056138dcfa 100644 (file)
 #define ANNCE_LENGTH 0
 #define ANNCE_DEFTIME 2
 
-#define MULTITEAM_ANNCE(prefix, defaultvalue, sound, channel, volume, position, queuetime) \
+#define MULTITEAM_ANNCE(prefix, defaultvalue, sound, channel, volume, position) \
     NOTIF_ADD_AUTOCVAR(ANNCE_##prefix, defaultvalue) \
-    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), channel, volume, position, queuetime) \
-    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), channel, volume, position, queuetime) \
-    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), channel, volume, position, queuetime) \
-    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), channel, volume, position, queuetime)
+    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), channel, volume, position) \
+    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), channel, volume, position) \
+    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), channel, volume, position) \
+    MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), channel, volume, position)
 
 // MSG_ANNCE_NOTIFICATIONS
     MSG_ANNCE_NOTIF(ACHIEVEMENT_AIRSHOT,        N_GNTLOFF, "airshot",           CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
     MSG_ANNCE_NOTIF(VOTE_CALL,                  N__ALWAYS, "votecall",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
     MSG_ANNCE_NOTIF(VOTE_FAIL,                  N__ALWAYS, "votefail",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
 
-    MSG_ANNCE_NOTIF(LEAD_GAINED,                N__ALWAYS, "leadgained",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(LEAD_LOST,                  N__ALWAYS, "leadlost",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(LEAD_TIED,                  N__ALWAYS, "leadtied",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
+    MSG_ANNCE_NOTIF(LEAD_GAINED,                N__ALWAYS, "leadgained",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(LEAD_LOST,                  N__ALWAYS, "leadlost",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(LEAD_TIED,                  N__ALWAYS, "leadtied",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
 
-    MSG_ANNCE_NOTIF(TEAM_SCORES_TEAM,           N__ALWAYS, "scores_team",       CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(TEAM_SCORES_ENEMY,          N__ALWAYS, "scores_enemy",      CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MULTITEAM_ANNCE(TEAM_SCORES,                N__ALWAYS, "scores_%s",         CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
+    MSG_ANNCE_NOTIF(TEAM_SCORES_TEAM,           N__ALWAYS, "scores_team",       CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(TEAM_SCORES_ENEMY,          N__ALWAYS, "scores_enemy",      CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MULTITEAM_ANNCE(TEAM_SCORES,                N__ALWAYS, "scores_%s",         CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
 
-    MSG_ANNCE_NOTIF(TEAM_LEADS_TEAM,            N__ALWAYS, "leads_team",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(TEAM_LEADS_ENEMY,           N__ALWAYS, "leads_enemy",       CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(TEAM_LEADS_TIED,            N__ALWAYS, "teamstied",         CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MULTITEAM_ANNCE(TEAM_LEADS,                 N__ALWAYS, "leads_%s",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
+    MSG_ANNCE_NOTIF(TEAM_LEADS_TEAM,            N__ALWAYS, "leads_team",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(TEAM_LEADS_ENEMY,           N__ALWAYS, "leads_enemy",       CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(TEAM_LEADS_TIED,            N__ALWAYS, "teamstied",         CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MULTITEAM_ANNCE(TEAM_LEADS,                 N__ALWAYS, "leads_%s",          CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
 
-    MULTITEAM_ANNCE(TEAM_WINS,                  N__ALWAYS, "wins_%s",           CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
+    MULTITEAM_ANNCE(TEAM_WINS,                  N__ALWAYS, "wins_%s",           CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
 
-    MULTITEAM_ANNCE(ROUND_TEAM_WIN,             N__ALWAYS, "round_win_%s",      CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(ROUND_OVER,                 N__ALWAYS, "round_over",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(ROUND_TIED,                 N__ALWAYS, "round_tied",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
-    MSG_ANNCE_NOTIF(ALONE,                      N__ALWAYS, "alone",             CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
+    MULTITEAM_ANNCE(ROUND_TEAM_WIN,             N__ALWAYS, "round_win_%s",      CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(ROUND_OVER,                 N__ALWAYS, "round_over",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(ROUND_TIED,                 N__ALWAYS, "round_tied",        CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
+    MSG_ANNCE_NOTIF(ALONE,                      N__ALWAYS, "alone",             CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
 
 #undef N___NEVER
 #undef N_GNTLOFF
index d6cb8f271e5731824ce2e22417877ea894c2e6ba..3984b912a1cfa0946200cde7d09d8cd45b80bf0f 100644 (file)
@@ -1442,7 +1442,8 @@ void AnnounceNewLeader()
                                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));
+                       // TODO : This needs relative announcing to be merged!
+                       //Send_Notification(NOTIF_ALL_SPEC, NULL, MSG_ANNCE, APP_TEAM_NUM(WinningConditionHelper_winnerteam, ANNCE_TEAM_LEADS));
        } else {
                if (WinningConditionHelper_equality)
                {
@@ -1459,7 +1460,11 @@ void AnnounceNewLeader()
 
 int team_scores;
 int fragsleft_last;
-#define AnnounceScores(tm) team_scores = tm;
+void AnnounceScores(int tm)
+{
+       team_scores = tm;
+}
+
 float WinningCondition_Scores(float limit, float leadlimit)
 {
        // TODO make everything use THIS winning condition (except LMS)
@@ -1536,10 +1541,11 @@ float WinningCondition_Scores(float limit, float leadlimit)
                                else
                                        Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_SCORES_ENEMY);
                        });
-                       Send_Notification(NOTIF_ALL_SPEC, NULL, MSG_ANNCE, APP_TEAM_NUM(team_scores, ANNCE_TEAM_SCORES));
+                       // TODO : This needs relative announcing to be merged!
+                       //Send_Notification(NOTIF_ALL_SPEC, NULL, MSG_ANNCE, APP_TEAM_NUM(team_scores, ANNCE_TEAM_SCORES));
                }
                team_scores = 0;
-       } else if(MUTATOR_CALLHOOK(Scores_AnnounceLeads) && Score_NewLeader()) {
+       } else if(MUTATOR_CALLHOOK(Scores_AnnounceLeads) && Score_NewLeader())
                AnnounceNewLeader();
 
        bool fraglimit_reached = (limit && WinningConditionHelper_topscore >= limit);