]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/notifications.qc
Undo last change of atten
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / notifications.qc
index 600ddaa1b3237301833480c7ef92cb901333b1a0..c46988dddecbd2ffde3d9f10e589af1c485d9522 100644 (file)
@@ -1,4 +1,5 @@
 #if defined(CSQC)
+       #include "../client/announcer.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
     #include "constants.qh"
@@ -7,7 +8,7 @@
     #include "../server/constants.qh"
     #include "../server/defs.qh"
     #include "notifications.qh"
-    #include "../server/mutators/mutators_include.qh"
+    #include "../server/mutators/all.qh"
 #endif
 
 // ================================================
@@ -523,6 +524,7 @@ void Create_Notification_Entity(
        //  Global Entity Setup
        // =====================
        entity notif = spawn();
+       make_pure(notif);
        switch(typeId)
        {
                case MSG_ANNCE:
@@ -595,7 +597,7 @@ void Create_Notification_Entity(
                                {
                                        if(notif.nent_enabled)
                                        {
-                                               precache_sound(sprintf("announcer/%s/%s.wav", autocvar_cl_announcer, snd));
+                                               precache_sound(sprintf("announcer/%s/%s.wav", AnnouncerOption(), snd));
                                                notif.nent_channel = channel;
                                                notif.nent_snd = strzone(snd);
                                                notif.nent_vol = vol;
@@ -1276,7 +1278,7 @@ void Local_Notification_sound(
                        soundchannel,
                        sprintf(
                                "announcer/%s/%s.wav",
-                               autocvar_cl_announcer,
+                               AnnouncerOption(),
                                soundfile
                        ),
                        soundvolume,
@@ -1289,7 +1291,7 @@ void Local_Notification_sound(
                        soundchannel,
                        sprintf(
                                "announcer/%s/%s.wav",
-                               autocvar_cl_announcer,
+                               AnnouncerOption(),
                                soundfile
                        ),
                        soundvolume,
@@ -1311,7 +1313,7 @@ void Local_Notification_sound(
                        soundchannel,
                        sprintf(
                                "announcer/%s/%s.wav",
-                               autocvar_cl_announcer,
+                               AnnouncerOption(),
                                soundfile
                        ),
                        soundvolume,
@@ -1841,8 +1843,8 @@ void Kill_Notification(
 
        if(killed_cpid != NO_CPID)
        {
-               net_notif = spawn();
-               net_notif.classname = "net_kill_notification";
+               net_notif = new(net_kill_notification);
+               make_pure(net_notif);
                net_notif.nent_broadcast = broadcast;
                net_notif.nent_client = client;
                net_notif.nent_net_type = MSG_CENTER_CPID;
@@ -2092,9 +2094,9 @@ void Send_Notification(
        }
        else
        {
-               entity net_notif = spawn();
+               entity net_notif = new(net_notification);
+               make_pure(net_notif);
                net_notif.owner = notif;
-               net_notif.classname = "net_notification";
                net_notif.nent_broadcast = broadcast;
                net_notif.nent_client = client;
                net_notif.nent_net_type = net_type;