]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/notifications/all.qh
Allow overriding frag centerprint message, fixes double kill message in freeze tag
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / notifications / all.qh
index 983b69f3f4562b3a6a96363ef94543940de4f983..2a1eb458f4a8a4cef20746a2cd04a9ebb313c635 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <common/command/all.qh>
+#include <common/command/_mod.qh>
 
 #include <common/constants.qh>
 #include <common/teams.qh>
@@ -75,8 +75,7 @@ USING(Notification, entity);
 
 // used for notification system multi-team identifiers
 #define APP_TEAM_NUM(num, prefix) ((num == NUM_TEAM_1) ? prefix##_RED : ((num == NUM_TEAM_2) ? prefix##_BLUE : ((num == NUM_TEAM_3) ? prefix##_YELLOW : prefix##_PINK)))
-/** @deprecated use APP_TEAM_NUM */
-#define APP_TEAM_ENT(ent, prefix) APP_TEAM_NUM(ent.team, prefix)
+#define APP_NUM(num, prefix) ((num) ? APP_TEAM_NUM(num, prefix) : prefix##_NEUTRAL)
 
 #define EIGHT_VARS_TO_VARARGS_VARLIST \
        VARITEM(1, 0, s1) \
@@ -159,7 +158,7 @@ GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt"
        {
                case CMD_REQUEST_COMMAND:
                {
-                       #ifndef MENUQC
+                       #ifdef GAMEQC
                        string filename = argv(1);
                        bool alsoprint = false;
                        if (filename == "")
@@ -225,6 +224,11 @@ string prev_soundfile;
 float prev_soundtime;
 #endif
 
+#ifdef SVQC
+IntrusiveList g_notifications;
+STATIC_INIT(g_notifications) { g_notifications = IL_NEW(); }
+#endif
+
 #ifdef SVQC
 ENUMCLASS(NOTIF)
        /** send to one client and their spectators */