]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Notifications: strong references
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 2 Mar 2016 23:46:02 +0000 (10:46 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 2 Mar 2016 23:46:02 +0000 (10:46 +1100)
28 files changed:
qcsrc/common/deathtypes/all.qh
qcsrc/common/mutators/mutator/overkill/hmg.qc
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/server/g_damage.qc

index b662b7e76feb041f960def35e8f224b59495bea9..dcf7a7001f62f723727cbaf20fc79d2f29ed58f3 100644 (file)
@@ -19,8 +19,8 @@ int dt_identity(int i) { return i; }
         this.m_id += DT_FIRST; \
         this.nent_name = #id; \
         this.death_msgextra = extra; \
-        if (msg_death       != NO_MSG) this.death_msgself   = msg_multi_notifs[dt_identity(msg_death    - 1)]; \
-        if (msg_death_by    != NO_MSG) this.death_msgmurder = msg_multi_notifs[dt_identity(msg_death_by - 1)]; \
+        if (msg_death       != NO_MSG) this.death_msgself   = msg_death; \
+        if (msg_death_by    != NO_MSG) this.death_msgmurder = msg_death_by; \
     }
 
 const int DEATH_WEAPONMASK = BITS(8);
index c08c3690ee51d7d80b43637448bac8e6d3184e9a..415a8526b5e0bb09568377244c9487be3dc0066c 100644 (file)
@@ -141,11 +141,11 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weapone
                {
                        W_Reload(self, WEP_CVAR(hmg, ammo), SND(RELOAD));
                }
-               METHOD(HeavyMachineGun, wr_suicidemessage, int(entity thiswep))
+               METHOD(HeavyMachineGun, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(HeavyMachineGun, wr_killmessage, int(entity thiswep))
+               METHOD(HeavyMachineGun, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_HMG_MURDER_SNIPE;
index 96e54d5a02c92dfb58feecf7a3688a8e3dc34cad..c32e613208598c6e7ffaa8ae85a306ae7ede5fa0 100644 (file)
@@ -189,14 +189,14 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                {
                        W_Reload(self, WEP_CVAR(rpc, ammo), SND(RELOAD));
                }
-               METHOD(RocketPropelledChainsaw, wr_suicidemessage, int(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_suicidemessage, Notification(entity thiswep))
                {
                        if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
                                return WEAPON_RPC_SUICIDE_SPLASH;
                        else
                                return WEAPON_RPC_SUICIDE_DIRECT;
                }
-               METHOD(RocketPropelledChainsaw, wr_killmessage, int(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_BLASTER_MURDER;
index 67a33b41968925187894b3724cca017474aacd2b..96edb6cf8311fde81d5974607d08a08377e7ce14 100644 (file)
@@ -685,7 +685,7 @@ void Create_Notification_Entity_InfoCenter(entity notif,
                                        notif.nent_durcnt = strzone(
                                                Process_Notif_Args(3, durcnt, typestring, namestring));
 
-                                       if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
+                                       if(cpid != NO_MSG_) { notif.nent_cpid = cpid; }
                                        else
                                        {
                                                LOG_INFOF(
@@ -699,7 +699,7 @@ void Create_Notification_Entity_InfoCenter(entity notif,
                                                notif_error = true;
                                        }
                                }
-                               else if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
+                               else if(cpid != NO_MSG_) { notif.nent_cpid = cpid; }
                                #endif
 
 
@@ -747,9 +747,9 @@ void Create_Notification_Entity_Multi(entity notif,
                                        float var_cvar,
                                        string namestring,
                                        /* MSG_MULTI */
-                                       int anncename,
-                                       int infoname,
-                                       int centername)
+                                       Notification anncename,
+                                       Notification infoname,
+                                       Notification centername)
                {
                    int typeId = MSG_MULTI;
                        // Set MSG_MULTI string/float counts
@@ -769,21 +769,21 @@ void Create_Notification_Entity_Multi(entity notif,
                        else
                        {
                                // announcements don't actually need any arguments, so lets not even count them.
-                               if(anncename != NO_MSG) { notif.nent_msgannce = msg_annce_notifs[anncename - 1]; }
+                               if(anncename != NO_MSG) { notif.nent_msgannce = anncename; }
 
                                float infoname_stringcount = 0, infoname_floatcount = 0;
                                float centername_stringcount = 0, centername_floatcount = 0;
 
                                if(infoname != NO_MSG)
                                {
-                                       notif.nent_msginfo = msg_info_notifs[infoname - 1];
+                                       notif.nent_msginfo = infoname;
                                        infoname_stringcount = notif.nent_msginfo.nent_stringcount;
                                        infoname_floatcount = notif.nent_msginfo.nent_floatcount;
                                }
 
                                if(centername != NO_MSG)
                                {
-                                       notif.nent_msgcenter = msg_center_notifs[centername - 1];
+                                       notif.nent_msgcenter = centername;
                                        centername_stringcount = notif.nent_msgcenter.nent_stringcount;
                                        centername_floatcount = notif.nent_msgcenter.nent_floatcount;
                                }
@@ -801,11 +801,11 @@ void Create_Notification_Entity_Choice(entity notif,
                                                float challow_def,
                                                float challow_var,
                                                int chtype,
-                                               int optiona,
-                                               int optionb)
+                                               Notification optiona,
+                                               Notification optionb)
                {
                    int typeId = MSG_CHOICE;
-                       if((chtype == NO_MSG) || (optiona == NO_MSG) || (optionb == NO_MSG))
+                       if((chtype == NO_MSG_) || (optiona == NO_MSG) || (optionb == NO_MSG))
                        {
                 string typestring = Get_Notif_TypeName(typeId);
                                LOG_INFOF(
@@ -820,53 +820,8 @@ void Create_Notification_Entity_Choice(entity notif,
                        }
                        else
                        {
-                               switch(chtype)
-                               {
-                                       case MSG_ANNCE:
-                                       {
-                                               notif.nent_optiona = msg_annce_notifs[optiona - 1];
-                                               notif.nent_optionb = msg_annce_notifs[optionb - 1];
-                                               break;
-                                       }
-                                       case MSG_INFO:
-                                       {
-                                               notif.nent_optiona = msg_info_notifs[optiona - 1];
-                                               notif.nent_optionb = msg_info_notifs[optionb - 1];
-                                               break;
-                                       }
-                                       case MSG_CENTER:
-                                       {
-                                               notif.nent_optiona = msg_center_notifs[optiona - 1];
-                                               notif.nent_optionb = msg_center_notifs[optionb - 1];
-                                               break;
-                                       }
-                                       case MSG_MULTI:
-                                       {
-                                               notif.nent_optiona = msg_multi_notifs[optiona - 1];
-                                               notif.nent_optionb = msg_multi_notifs[optionb - 1];
-                                               break;
-                                       }
-                                       case MSG_CHOICE: // should we REALLY allow nested options?...
-                                       {
-                                               notif.nent_optiona = msg_choice_notifs[optiona - 1];
-                                               notif.nent_optionb = msg_choice_notifs[optionb - 1];
-                                               break;
-                                       }
-
-                                       default:
-                                       {
-                                               LOG_INFOF(
-                                                       strcat(
-                                                               "^1NOTIFICATION WITH IMPROPER TYPE: ",
-                                                               "^7net_type = %d, net_name = %s.\n"
-                                                       ),
-                                                       typeId,
-                                                       namestring
-                                               );
-                                               notif_error = true;
-                                               break;
-                                       }
-                               }
+                           notif.nent_optiona = optiona;
+                notif.nent_optionb = optionb;
                                notif.nent_challow_def = challow_def; // 0: never allowed, 1: allowed in warmup, 2: always allowed
                                notif.nent_challow_var = challow_var; // 0: never allowed, 1: allowed in warmup, 2: always allowed
                                notif.nent_stringcount = max(notif.nent_optiona.nent_stringcount, notif.nent_optionb.nent_stringcount);
@@ -1380,7 +1335,7 @@ void Local_Notification_centerprint_generic(
 }
 #endif
 
-void Local_Notification(int net_type, int net_name, ...count)
+void Local_Notification(int net_type, Notification net_name, ...count)
 {
        // check if this should be aborted
        if(net_name == NOTIF_ABORT)
@@ -1396,7 +1351,7 @@ void Local_Notification(int net_type, int net_name, ...count)
        }
 
        // check supplied type and name for errors
-       string checkargs = Notification_CheckArgs_TypeName(net_type, net_name);
+       string checkargs = Notification_CheckArgs_TypeName(net_type, net_name.nent_id);
        if(checkargs != "")
        {
                #ifdef NOTIFICATIONS_DEBUG
@@ -1411,7 +1366,7 @@ void Local_Notification(int net_type, int net_name, ...count)
        }
 
        // retreive entity of this notification
-       entity notif = Get_Notif_Ent(net_type, net_name);
+       entity notif = net_name;
        if (!notif)
        {
                #ifdef NOTIFICATIONS_DEBUG
@@ -1560,7 +1515,7 @@ void Local_Notification(int net_type, int net_name, ...count)
                        {
                                Local_Notification_WOVA(
                                        MSG_INFO,
-                                       notif.nent_msginfo.nent_id,
+                                       notif.nent_msginfo,
                                        notif.nent_msginfo.nent_stringcount,
                                        notif.nent_msginfo.nent_floatcount,
                                        s1, s2, s3, s4,
@@ -1572,7 +1527,7 @@ void Local_Notification(int net_type, int net_name, ...count)
                        {
                                Local_Notification_WOVA(
                                        MSG_ANNCE,
-                                       notif.nent_msgannce.nent_id,
+                                       notif.nent_msgannce,
                                        0, 0,
                                        "", "", "", "",
                                        0, 0, 0, 0);
@@ -1582,7 +1537,7 @@ void Local_Notification(int net_type, int net_name, ...count)
                        {
                                Local_Notification_WOVA(
                                        MSG_CENTER,
-                                       notif.nent_msgcenter.nent_id,
+                                       notif.nent_msgcenter,
                                        notif.nent_msgcenter.nent_stringcount,
                                        notif.nent_msgcenter.nent_floatcount,
                                        s1, s2, s3, s4,
@@ -1609,7 +1564,7 @@ void Local_Notification(int net_type, int net_name, ...count)
 
                        Local_Notification_WOVA(
                                found_choice.nent_type,
-                               found_choice.nent_id,
+                               found_choice,
                                found_choice.nent_stringcount,
                                found_choice.nent_floatcount,
                                s1, s2, s3, s4,
@@ -1620,7 +1575,7 @@ void Local_Notification(int net_type, int net_name, ...count)
 
 // WOVA = Without Variable Arguments
 void Local_Notification_WOVA(
-       int net_type, float net_name,
+       int net_type, Notification net_name,
        float stringcount, float floatcount,
        string s1, string s2, string s3, string s4,
        float f1, float f2, float f3, float f4)
@@ -1706,7 +1661,7 @@ NET_HANDLE(ENT_CLIENT_NOTIFICATION, bool is_new)
                if(is_new)
                {
                        Local_Notification_WOVA(
-                               net_type, net_name,
+                               net_type, notif,
                                notif.nent_stringcount,
                                notif.nent_floatcount,
                                s1, s2, s3, s4,
@@ -1844,7 +1799,7 @@ void Kill_Notification(
 
 void Send_Notification(
        NOTIF broadcast, entity client,
-       float net_type, float net_name,
+       float net_type, Notification net_name,
        ...count)
 {
        // check if this should be aborted
@@ -1863,7 +1818,7 @@ void Send_Notification(
        }
 
        // check supplied broadcast, target, type, and name for errors
-       string checkargs = Notification_CheckArgs(broadcast, client, net_type, net_name);
+       string checkargs = Notification_CheckArgs(broadcast, client, net_type, net_name.nent_id);
        if(checkargs != "")
        {
                #ifdef NOTIFICATIONS_DEBUG
@@ -1880,7 +1835,7 @@ void Send_Notification(
        }
 
        // retreive entity of this notification
-       entity notif = Get_Notif_Ent(net_type, net_name);
+       entity notif = net_name;
        if (!notif)
        {
                #ifdef NOTIFICATIONS_DEBUG
@@ -2011,7 +1966,7 @@ void Send_Notification(
                #define RECURSE_FROM_CHOICE(ent,action) MACRO_BEGIN { \
                        if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) \
                        { \
-                               switch(ent.msg_choice_choices[net_name - 1]) \
+                               switch(ent.msg_choice_choices[net_name.nent_id - 1]) \
                                { \
                                        case 1: found_choice = notif.nent_optiona; break; \
                                        case 2: found_choice = notif.nent_optionb; break; \
@@ -2023,7 +1978,7 @@ void Send_Notification(
                                NOTIF_ONE_ONLY, \
                                ent, \
                                found_choice.nent_type, \
-                               found_choice.nent_id, \
+                               found_choice, \
                                found_choice.nent_stringcount, \
                                found_choice.nent_floatcount, \
                                s1, s2, s3, s4, \
@@ -2060,7 +2015,7 @@ void Send_Notification(
                net_notif.nent_broadcast = broadcast;
                net_notif.nent_client = client;
                net_notif.nent_net_type = net_type;
-               net_notif.nent_net_name = net_name;
+               net_notif.nent_net_name = net_name.nent_id;
                net_notif.nent_stringcount = notif.nent_stringcount;
                net_notif.nent_floatcount = notif.nent_floatcount;
 
@@ -2085,7 +2040,7 @@ void Send_Notification(
 // WOVA = Without Variable Arguments
 void Send_Notification_WOVA(
        NOTIF broadcast, entity client,
-       float net_type, float net_name,
+       float net_type, Notification net_name,
        float stringcount, float floatcount,
        string s1, string s2, string s3, string s4,
        float f1, float f2, float f3, float f4)
@@ -2119,11 +2074,11 @@ void Send_Notification_WOVA(
 // WOCOVA = Without Counts Or Variable Arguments
 void Send_Notification_WOCOVA(
        NOTIF broadcast, entity client,
-       float net_type, float net_name,
+       float net_type, Notification net_name,
        string s1, string s2, string s3, string s4,
        float f1, float f2, float f3, float f4)
 {
-       entity notif = Get_Notif_Ent(net_type, net_name);
+       entity notif = net_name;
 
        #ifdef NOTIFICATIONS_DEBUG
        Debug_Notification(sprintf(
index ba7371fce5e05344da857b4e21aa826d92fda53e..4df13ac90b25606ee884a27591e55f92a7ce6df7 100644 (file)
@@ -20,9 +20,16 @@ const int MSG_CENTER_CPID = 4; // Kill centerprint message
 const int MSG_MULTI = 5; // Subcall MSG_INFO and/or MSG_CENTER notifications
 const int MSG_CHOICE = 6; // Choose which subcall wrapper to activate
 
+typedef entity Notification;
+
 // negative confirmations
-const int NO_MSG = -12345;  // allows various things to know when no information is added
-const int NOTIF_ABORT = -1234;   // allows Send_Notification to safely abort sending
+/** allows various things to know when no information is added */
+Notification NO_MSG;
+STATIC_INIT(NO_MSG) { NO_MSG = new(Notification); }
+const int NO_MSG_ = -12345;
+/** allows Send_Notification to safely abort sending */
+Notification NOTIF_ABORT;
+STATIC_INIT(NOTIF_ABORT) { NOTIF_ABORT = new(Notification); }
 
 #define EIGHT_VARS_TO_VARARGS_VARLIST \
     VARITEM(1, 0, s1) \
@@ -84,9 +91,9 @@ void Create_Notification_Entity_Multi(entity notif,
                                        float var_cvar,
                                        string namestring,
                                        /* MSG_MULTI */
-                                       int anncename,
-                                       int infoname,
-                                       int centername);
+                                       Notification anncename,
+                                       Notification infoname,
+                                       Notification centername);
 
 void Create_Notification_Entity_Choice(entity notif,
                                                float var_cvar,
@@ -95,8 +102,8 @@ void Create_Notification_Entity_Choice(entity notif,
                                                float challow_def,
                                                float challow_var,
                                                int chtype,
-                                               int optiona,
-                                               int optionb);
+                                               Notification optiona,
+                                               Notification optionb);
 
 void Dump_Notifications(float fh, float alsoprint);
 
@@ -155,9 +162,9 @@ GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt"
 void Debug_Notification(string input);
 #endif
 
-void Local_Notification(int net_type, int net_name, ...count);
+void Local_Notification(int net_type, Notification net_name, ...count);
 void Local_Notification_WOVA(
-    float net_type, float net_name,
+    float net_type, Notification net_name,
     float stringcount, float floatcount,
     string s1, string s2, string s3, string s4,
     float f1, float f2, float f3, float f4);
@@ -182,17 +189,17 @@ void Kill_Notification(
     float net_type, float net_name);
 void Send_Notification(
     NOTIF broadcast, entity client,
-    float net_type, float net_name,
+    float net_type, Notification net_name,
     ...count);
 void Send_Notification_WOVA(
     NOTIF broadcast, entity client,
-    float net_type, float net_name,
+    float net_type, Notification net_name,
     float stringcount, float floatcount,
     string s1, string s2, string s3, string s4,
     float f1, float f2, float f3, float f4);
 void Send_Notification_WOCOVA(
     NOTIF broadcast, entity client,
-    float net_type, float net_name,
+    float net_type, Notification net_name,
     string s1, string s2, string s3, string s4,
     float f1, float f2, float f3, float f4);
 #endif
@@ -364,7 +371,7 @@ string BUFF_NAME(int i);
 #ifdef CSQC
 string notif_arg_frag_ping(float newline, float fping)
 {
-    if(fping == NO_MSG)
+    if(fping == NO_MSG_)
         return sprintf(CCR(_("%s(^F1Bot^BG)")), (newline ? "\n" : " "));
     else
         return sprintf(CCR(_("%s(Ping ^F1%d^BG)")), (newline ? "\n" : " "), fping);
@@ -664,13 +671,14 @@ float notif_global_error;
     MSG_ANNCE_NOTIF_(ANNCE_##name, default, sound, channel, volume, position)
 #define MSG_ANNCE_NOTIF_(name, default, sound, channel, volume, position) \
     NOTIF_ADD_AUTOCVAR(name, default) \
-    float name; \
+    Notification name; \
     void RegisterNotification_##name() \
     { \
-        SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_ANNCE_COUNT) \
-        CHECK_MAX_COUNT(name, NOTIF_ANNCE_MAX, NOTIF_ANNCE_COUNT, "MSG_ANNCE") \
-        entity this = msg_annce_notifs[name - 1] = new_pure(msg_annce_notification); \
-        Create_Notification_Entity      (this, default, ACVNN(name), MSG_ANNCE, name, strtoupper(#name)); \
+        int name##_ = 0; \
+        SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_ANNCE_COUNT) \
+        CHECK_MAX_COUNT(name##_, NOTIF_ANNCE_MAX, NOTIF_ANNCE_COUNT, "MSG_ANNCE") \
+        entity this = name = msg_annce_notifs[name##_ - 1] = new_pure(msg_annce_notification); \
+        Create_Notification_Entity      (this, default, ACVNN(name), MSG_ANNCE, name##_, strtoupper(#name)); \
         Create_Notification_Entity_Annce(this, ACVNN(name), strtoupper(#name), \
             channel,   /* channel  */ \
             sound,     /* snd      */ \
@@ -683,18 +691,19 @@ float notif_global_error;
     MSG_INFO_NOTIF_(INFO_##name, default, strnum, flnum, args, hudargs, icon, normal, gentle)
 #define MSG_INFO_NOTIF_(name, default, strnum, flnum, args, hudargs, icon, normal, gentle) \
     NOTIF_ADD_AUTOCVAR(name, default) \
-    int name; \
+    Notification name; \
     void RegisterNotification_##name() \
     { \
-        SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
-        CHECK_MAX_COUNT(name, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
-        entity this = msg_info_notifs[name - 1] = new_pure(msg_info_notification); \
-        Create_Notification_Entity           (this, default, ACVNN(name), MSG_INFO, name, strtoupper(#name)); \
+        int name##_ = 0; \
+        SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_INFO_COUNT) \
+        CHECK_MAX_COUNT(name##_, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
+        entity this = name = msg_info_notifs[name##_ - 1] = new_pure(msg_info_notification); \
+        Create_Notification_Entity           (this, default, ACVNN(name), MSG_INFO, name##_, strtoupper(#name)); \
         Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
             args,     /* args    */ \
             hudargs,  /* hudargs */ \
             icon,     /* icon    */ \
-            NO_MSG  /* cpid    */ \
+            NO_MSG_,  /* cpid    */ \
             "",       /* durcnt  */ \
             normal,   /* normal  */ \
             gentle);  /* gentle  */ \
@@ -706,22 +715,23 @@ float notif_global_error;
     MULTIICON_INFO_(INFO_##name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle)
 #define MULTIICON_INFO_(name, default, strnum, flnum, args, hudargs, iconargs, icon, normal, gentle) \
     NOTIF_ADD_AUTOCVAR(name, default) \
-    int name; \
+    Notification name; \
     void RegisterNotification_##name() \
     { \
-        SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
-        CHECK_MAX_COUNT(name, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
-        entity this = msg_info_notifs[name - 1] = new_pure(msg_info_notification); \
-        Create_Notification_Entity           (this, default, ACVNN(name), MSG_INFO, name, strtoupper(#name)); \
+        int name##_ = 0; \
+        SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_INFO_COUNT) \
+        CHECK_MAX_COUNT(name##_, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
+        entity this = name = msg_info_notifs[name##_ - 1] = new_pure(msg_info_notification); \
+        Create_Notification_Entity           (this, default, ACVNN(name), MSG_INFO, name##_, strtoupper(#name)); \
         Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
             args,     /* args    */ \
             hudargs,  /* hudargs */ \
             icon,     /* icon    */ \
-            NO_MSG  /* cpid    */ \
+            NO_MSG_,  /* cpid    */ \
             "",       /* durcnt  */ \
             normal,   /* normal  */ \
             gentle);  /* gentle  */ \
-        msg_info_notifs[name - 1].nent_iconargs = iconargs; \
+        this.nent_iconargs = iconargs; \
     } \
     ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
 
@@ -729,13 +739,14 @@ float notif_global_error;
     MSG_CENTER_NOTIF_(CENTER_##name, default, strnum, flnum, args, cpid, durcnt, normal, gentle)
 #define MSG_CENTER_NOTIF_(name, default, strnum, flnum, args, cpid, durcnt, normal, gentle) \
     NOTIF_ADD_AUTOCVAR(name, default) \
-    float name; \
+    Notification name; \
     void RegisterNotification_##name() \
     { \
-        SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CENTER_COUNT) \
-        CHECK_MAX_COUNT(name, NOTIF_CENTER_MAX, NOTIF_CENTER_COUNT, "MSG_CENTER") \
-        entity this = msg_center_notifs[name - 1] = new_pure(msg_center_notification); \
-        Create_Notification_Entity           (this, default, ACVNN(name), MSG_CENTER, name, strtoupper(#name)); \
+        int name##_ = 0; \
+        SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_CENTER_COUNT) \
+        CHECK_MAX_COUNT(name##_, NOTIF_CENTER_MAX, NOTIF_CENTER_COUNT, "MSG_CENTER") \
+        entity this = name = msg_center_notifs[name##_ - 1] = new_pure(msg_center_notification); \
+        Create_Notification_Entity           (this, default, ACVNN(name), MSG_CENTER, name##_, strtoupper(#name)); \
         Create_Notification_Entity_InfoCenter(this, ACVNN(name), strtoupper(#name), strnum, flnum, \
             args,    /* args    */ \
             "",      /* hudargs */ \
@@ -749,13 +760,14 @@ float notif_global_error;
 
 #define MSG_MULTI_NOTIF(name, default, anncename, infoname, centername) \
     NOTIF_ADD_AUTOCVAR(name, default) \
-    int name; \
+    Notification name; \
     void RegisterNotification_##name() \
     { \
-        SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_MULTI_COUNT) \
-        CHECK_MAX_COUNT(name, NOTIF_MULTI_MAX, NOTIF_MULTI_COUNT, "MSG_MULTI") \
-        entity this = msg_multi_notifs[name - 1] = new_pure(msg_multi_notification); \
-        Create_Notification_Entity      (this, default, ACVNN(name), MSG_MULTI, name, strtoupper(#name)); \
+        int name##_ = 0; \
+        SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_MULTI_COUNT) \
+        CHECK_MAX_COUNT(name##_, NOTIF_MULTI_MAX, NOTIF_MULTI_COUNT, "MSG_MULTI") \
+        entity this = name = msg_multi_notifs[name##_ - 1] = new_pure(msg_multi_notification); \
+        Create_Notification_Entity      (this, default, ACVNN(name), MSG_MULTI, name##_, strtoupper(#name)); \
         Create_Notification_Entity_Multi(this, ACVNN(name), strtoupper(#name), \
             anncename,   /* anncename  */ \
             infoname,    /* infoname   */ \
@@ -768,13 +780,14 @@ float notif_global_error;
 #define MSG_CHOICE_NOTIF_(name, default, challow, chtype, optiona, optionb) \
     NOTIF_ADD_AUTOCVAR(name, default) \
     NOTIF_ADD_AUTOCVAR(name##_ALLOWED, challow) \
-    float name; \
+    Notification name; \
     void RegisterNotification_##name() \
     { \
-        SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CHOICE_COUNT) \
-        CHECK_MAX_COUNT(name, NOTIF_CHOICE_MAX, NOTIF_CHOICE_COUNT, "MSG_CHOICE") \
-        entity this = msg_choice_notifs[name - 1] = new_pure(msg_choice_notification); \
-        Create_Notification_Entity       (this, default, ACVNN(name), MSG_CHOICE, name, strtoupper(#name)); \
+        int name##_ = 0; \
+        SET_FIELD_COUNT(name##_, NOTIF_FIRST, NOTIF_CHOICE_COUNT) \
+        CHECK_MAX_COUNT(name##_, NOTIF_CHOICE_MAX, NOTIF_CHOICE_COUNT, "MSG_CHOICE") \
+        entity this = name = msg_choice_notifs[name##_ - 1] = new_pure(msg_choice_notification); \
+        Create_Notification_Entity       (this, default, ACVNN(name), MSG_CHOICE, name##_, strtoupper(#name)); \
         Create_Notification_Entity_Choice(this, ACVNN(name), strtoupper(#name), \
             challow,                                 /* challow_def */ \
             autocvar_notification_##name##_ALLOWED,  /* challow_var */ \
index a087c9faa07851db1bb0134161223772de880381..9072d24dc192760ddb3a9d0f59ff35f39aed12f7 100644 (file)
@@ -1489,7 +1489,7 @@ void dedicated_print(string input) // print(), but only print if the server is n
 #endif
 
 #ifndef MENUQC
-float Announcer_PickNumber(float type, float num)
+Notification Announcer_PickNumber(float type, float num)
 {
        switch(type)
        {
index fd5c888893959c10879ce42cfab80248e54e4853..c20e6df6c5885c2a840bb5babd300228a708fbd8 100644 (file)
@@ -286,7 +286,7 @@ const float CNT_IDLE = 3;
 const float CNT_KILL = 4;
 const float CNT_RESPAWN = 5;
 const float CNT_ROUNDSTART = 6;
-float Announcer_PickNumber(float type, float num);
+entity Announcer_PickNumber(float type, float num);
 #endif
 
 #ifndef MENUQC
index b529d109d4ccf7861ea9ee569a5844d45bce1ec4..4a12dee270e0189597058f49ef1fa1e43c2754fe 100644 (file)
@@ -93,9 +93,9 @@ CLASS(Weapon, Object)
     /** (BOTH)   precaches models/sounds used by this weapon, also sets up weapon properties */
     METHOD(Weapon, wr_init, void(Weapon this)) {}
     /** (SERVER) notification number for suicide message (may inspect w_deathtype for details) */
-    METHOD(Weapon, wr_suicidemessage, int(Weapon this)) {return 0;}
+    METHOD(Weapon, wr_suicidemessage, entity(Weapon this)) {return NULL;}
     /** (SERVER) notification number for kill message (may inspect w_deathtype for details) */
-    METHOD(Weapon, wr_killmessage, int(Weapon this)) {return 0;}
+    METHOD(Weapon, wr_killmessage, entity(Weapon this)) {return NULL;}
     /** (SERVER) handles reloading for weapon */
     METHOD(Weapon, wr_reload, void(Weapon this, entity actor, .entity weaponentity)) {}
     /** (SERVER) clears fields that the weapon may use */
index 1d3ea78a5bf41c0ae8fa091f87aa9467674259ca..903f6e76cf169e4560366e80f51c0760d09ad42e 100644 (file)
@@ -842,7 +842,7 @@ void Arc_Smoke()
                                return WEP_CVAR(arc, overheat_max) > 0 &&
                                        ((!WEP_CVAR(arc, burst_ammo)) || (self.(thiswep.ammo_field) > 0));
                }
-               METHOD(Arc, wr_killmessage, int(entity thiswep))
+               METHOD(Arc, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_ARC_MURDER_SPRAY;
index 1d76279f33a9e09bab8178a8e8f7723c367f0f68..f983bc4b36d850b21893b06230af78623fa2a1fc 100644 (file)
@@ -237,12 +237,12 @@ void W_Blaster_Attack(
                        return true; // blaster has infinite ammo
                }
 
-               METHOD(Blaster, wr_suicidemessage, int(entity thiswep))
+               METHOD(Blaster, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_BLASTER_SUICIDE;
                }
 
-               METHOD(Blaster, wr_killmessage, int(entity thiswep))
+               METHOD(Blaster, wr_killmessage, Notification(entity thiswep))
                {
                        return WEAPON_BLASTER_MURDER;
                }
index 455567a2f2eedf912c67349827b9632ad7c5be9f..c93e34a7f16a5a99c37bb2defba1dc2d6a482fc6 100644 (file)
@@ -657,11 +657,11 @@ void W_Crylink_Attack2(Weapon thiswep)
                {
                        W_Reload(self, min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), SND(RELOAD));
                }
-               METHOD(Crylink, wr_suicidemessage, int(entity thiswep))
+               METHOD(Crylink, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_CRYLINK_SUICIDE;
                }
-               METHOD(Crylink, wr_killmessage, int(entity thiswep))
+               METHOD(Crylink, wr_killmessage, Notification(entity thiswep))
                {
                        return WEAPON_CRYLINK_MURDER;
                }
index 0272e424c96b528442f4f6b898d0d66e302d72b7..0cbaf7980c784b5f85cc8ad9eae642dad8d06767 100644 (file)
@@ -608,11 +608,11 @@ void W_Devastator_Attack(Weapon thiswep)
                {
                        W_Reload(self, WEP_CVAR(devastator, ammo), SND(RELOAD));
                }
-               METHOD(Devastator, wr_suicidemessage, int(entity thiswep))
+               METHOD(Devastator, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_DEVASTATOR_SUICIDE;
                }
-               METHOD(Devastator, wr_killmessage, int(entity thiswep))
+               METHOD(Devastator, wr_killmessage, Notification(entity thiswep))
                {
                        if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
                                return WEAPON_DEVASTATOR_MURDER_SPLASH;
index 3e93644fb87e31f5f104a0cc5bdb1b4d2a865c25..dde736ba0e6b89e0982440bc03c5864d87c40716 100644 (file)
@@ -519,14 +519,14 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, .entity weaponentity, i
                {
                        W_Reload(self, min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), SND(RELOAD));
                }
-               METHOD(Electro, wr_suicidemessage, int(entity thiswep))
+               METHOD(Electro, wr_suicidemessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_ELECTRO_SUICIDE_ORBS;
                        else
                                return WEAPON_ELECTRO_SUICIDE_BOLT;
                }
-               METHOD(Electro, wr_killmessage, int(entity thiswep))
+               METHOD(Electro, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
index 50119a6879d26a688f13e03cb4c9fc29c2c2b487..62c43a52ea7fdbbdb356c1c77de7e1f95c2e11b9 100644 (file)
@@ -408,14 +408,14 @@ void W_Fireball_Attack2()
                {
                        self.fireball_primarytime = time;
                }
-               METHOD(Fireball, wr_suicidemessage, int(entity thiswep))
+               METHOD(Fireball, wr_suicidemessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_FIREBALL_SUICIDE_FIREMINE;
                        else
                                return WEAPON_FIREBALL_SUICIDE_BLAST;
                }
-               METHOD(Fireball, wr_killmessage, int(entity thiswep))
+               METHOD(Fireball, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_FIREBALL_MURDER_FIREMINE;
index ff6088f8f35b3d44c7902892b415e27f005dacad..505a656ec8c9866df0b0b8e5e691b7147dc76f14 100644 (file)
@@ -478,11 +478,11 @@ void W_Hagar_Attack2_Load(Weapon thiswep, .entity weaponentity)
                        if(!self.hagar_load) // require releasing loaded rockets first
                                W_Reload(self, min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), SND(RELOAD));
                }
-               METHOD(Hagar, wr_suicidemessage, int(entity thiswep))
+               METHOD(Hagar, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_HAGAR_SUICIDE;
                }
-               METHOD(Hagar, wr_killmessage, int(entity thiswep))
+               METHOD(Hagar, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_HAGAR_MURDER_BURST;
index 3c158f60814e07524c6a483de523d3cfb1997489..da772a8a2b5403e1253a1091581582b7d5c08989 100644 (file)
@@ -250,11 +250,11 @@ void W_HLAC_Attack2_Frame(Weapon thiswep)
                {
                        W_Reload(self, min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo)), SND(RELOAD));
                }
-               METHOD(HLAC, wr_suicidemessage, int(entity thiswep))
+               METHOD(HLAC, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_HLAC_SUICIDE;
                }
-               METHOD(HLAC, wr_killmessage, int(entity thiswep))
+               METHOD(HLAC, wr_killmessage, Notification(entity thiswep))
                {
                        return WEAPON_HLAC_MURDER;
                }
index 96743b75e73e6570054a34b8f5e3b3cd919d299d..a5c990627a88a518c8a8c8ddc32b1458a76823a8 100644 (file)
@@ -295,11 +295,11 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
                        self.hook_time = 0;
                        self.hook_refire = time;
                }
-               METHOD(Hook, wr_suicidemessage, int(entity thiswep))
+               METHOD(Hook, wr_suicidemessage, Notification(entity thiswep))
                {
-                       return false;
+                       return NULL;
                }
-               METHOD(Hook, wr_killmessage, int(entity thiswep))
+               METHOD(Hook, wr_killmessage, Notification(entity thiswep))
                {
                        return WEAPON_HOOK_MURDER;
                }
index f220752b30088816e7264c730ca18735f243b365..aefddc02709617f8eb2ad51a878e53751f66a3da 100644 (file)
@@ -338,11 +338,11 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, entity actor, .entity weaponentit
                {
                        W_Reload(self, min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)), SND(RELOAD));
                }
-               METHOD(MachineGun, wr_suicidemessage, int(entity thiswep))
+               METHOD(MachineGun, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(MachineGun, wr_killmessage, int(entity thiswep))
+               METHOD(MachineGun, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_MACHINEGUN_MURDER_SNIPE;
index e5c43f3a45879ac2e52df673ac08b8a0e412a7de..9c6418ffd4f3b4c7009993b0e1ab8434799d4e66 100644 (file)
@@ -553,11 +553,11 @@ float W_MineLayer_PlacedMines(float detonate)
                {
                        W_Reload(self, WEP_CVAR(minelayer, ammo), SND(RELOAD));
                }
-               METHOD(MineLayer, wr_suicidemessage, int(entity thiswep))
+               METHOD(MineLayer, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_MINELAYER_SUICIDE;
                }
-               METHOD(MineLayer, wr_killmessage, int(entity thiswep))
+               METHOD(MineLayer, wr_killmessage, Notification(entity thiswep))
                {
                        return WEAPON_MINELAYER_MURDER;
                }
index b361a505091adad8c4ee0ee2e23b1f470d72bca4..08b79bb2687b0363658ed82e11b41d0186fe8376 100644 (file)
@@ -387,14 +387,14 @@ void W_Mortar_Attack2(Weapon thiswep)
                {
                        W_Reload(self, min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo)), SND(RELOAD)); // WEAPONTODO
                }
-               METHOD(Mortar, wr_suicidemessage, int(entity thiswep))
+               METHOD(Mortar, wr_suicidemessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_MORTAR_SUICIDE_BOUNCE;
                        else
                                return WEAPON_MORTAR_SUICIDE_EXPLODE;
                }
-               METHOD(Mortar, wr_killmessage, int(entity thiswep))
+               METHOD(Mortar, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_MORTAR_MURDER_BOUNCE;
index 526ba0e2056ff866a84e34bb7ff99d9f6ea92cc7..23f96f6300f66caa00278326f8674e1df98ce164 100644 (file)
@@ -216,11 +216,11 @@ void W_Rifle_BulletHail(.entity weaponentity, float mode, void() AttackFunc, WFR
                {
                        W_Reload(self, min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), SND(RELOAD));
                }
-               METHOD(Rifle, wr_suicidemessage, int(entity thiswep))
+               METHOD(Rifle, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Rifle, wr_killmessage, int(entity thiswep))
+               METHOD(Rifle, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
index a25e928cba43e8ea12d1e86fe0d731da5cef9685..94e3abdd59400e0690a690485caa9bf1980f0ea8 100644 (file)
@@ -686,11 +686,11 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
                {
                        W_Reload(self, min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), SND(RELOAD));
                }
-               METHOD(Seeker, wr_suicidemessage, int(entity thiswep))
+               METHOD(Seeker, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_SEEKER_SUICIDE;
                }
-               METHOD(Seeker, wr_killmessage, int(entity thiswep))
+               METHOD(Seeker, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_SEEKER_MURDER_TAG;
index 46cb78e0a67e2d2b15b0640b342b6b87531d348c..1bf0b128e1680c57364154184db95da5011a7eaa 100644 (file)
@@ -713,11 +713,11 @@ void W_Shockwave_Attack()
                        // shockwave has infinite ammo
                        return true;
                }
-               METHOD(Shockwave, wr_suicidemessage, int(entity thiswep))
+               METHOD(Shockwave, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Shockwave, wr_killmessage, int(entity thiswep))
+               METHOD(Shockwave, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_SHOCKWAVE_MURDER_SLAP;
index 7da7dfd04167373c39953b0e16d7915691af9b3b..263626b3120d1529f668d66e003ffa4659d0df3d 100644 (file)
@@ -311,11 +311,11 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, .entity weaponentity
                {
                        W_Reload(self, WEP_CVAR_PRI(shotgun, ammo), SND(RELOAD)); // WEAPONTODO
                }
-               METHOD(Shotgun, wr_suicidemessage, int(entity thiswep))
+               METHOD(Shotgun, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Shotgun, wr_killmessage, int(entity thiswep))
+               METHOD(Shotgun, wr_killmessage, Notification(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_SHOTGUN_MURDER_SLAP;
index 0e429acb22b50e1ff66d17461c4f0a24f2f08dc6..1c9406e80578be96dc35e26810cfe349ccfb5e4d 100644 (file)
@@ -464,7 +464,7 @@ METHOD(Tuba, wr_reload, void(Tuba this, entity actor, .entity weaponentity))
 METHOD(Tuba, wr_checkammo1, bool(Tuba this)) { return true; }
 METHOD(Tuba, wr_checkammo2, bool(Tuba this)) { return true; }
 
-METHOD(Tuba, wr_suicidemessage, int(Tuba this))
+METHOD(Tuba, wr_suicidemessage, Notification(Tuba this))
 {
        if (w_deathtype & HITTYPE_BOUNCE)
                return WEAPON_KLEINBOTTLE_SUICIDE;
@@ -473,7 +473,7 @@ METHOD(Tuba, wr_suicidemessage, int(Tuba this))
        else
                return WEAPON_TUBA_SUICIDE;
 }
-METHOD(Tuba, wr_killmessage, int(Tuba this))
+METHOD(Tuba, wr_killmessage, Notification(Tuba this))
 {
        if (w_deathtype & HITTYPE_BOUNCE)
                return WEAPON_KLEINBOTTLE_MURDER;
index 2ece549321f0a63abda2e02d825c7718d308ef30..e568acac1f9fe6a81d3f9833890e64c95070e994 100644 (file)
@@ -455,11 +455,11 @@ void W_RocketMinsta_Attack3 ()
 
                        W_Reload(self, used_ammo, SND(RELOAD));
                }
-               METHOD(Vaporizer, wr_suicidemessage, int(entity thiswep))
+               METHOD(Vaporizer, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Vaporizer, wr_killmessage, int(entity thiswep))
+               METHOD(Vaporizer, wr_killmessage, Notification(entity thiswep))
                {
                        return WEAPON_VAPORIZER_MURDER;
                }
index 83ea7e597643820988d78ea5e040b7888d838d46..376b8922ac96098db74e81cd1001b1f0b7739a7c 100644 (file)
@@ -358,11 +358,11 @@ void W_Vortex_Attack(Weapon thiswep, float issecondary)
                {
                        W_Reload(self, min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), SND(RELOAD));
                }
-               METHOD(Vortex, wr_suicidemessage, int(entity thiswep))
+               METHOD(Vortex, wr_suicidemessage, Notification(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Vortex, wr_killmessage, int(entity thiswep))
+               METHOD(Vortex, wr_killmessage, Notification(entity thiswep))
                {
                        return WEAPON_VORTEX_MURDER;
                }
index 23897720e3ecf75492058975180c5a4643cd0626..e73f80a68c83a00949946fa6a113a45c137a84ab 100644 (file)
@@ -174,7 +174,7 @@ void Obituary_SpecialDeath(
                                        NOTIF_ONE,
                                        notif_target,
                                        MSG_MULTI,
-                                       deathent.death_msgmurder.nent_id,
+                                       deathent.death_msgmurder,
                                        s1, s2, s3, "",
                                        f1, f2, f3, 0
                                );
@@ -182,7 +182,7 @@ void Obituary_SpecialDeath(
                                        NOTIF_ALL_EXCEPT,
                                        notif_target,
                                        MSG_INFO,
-                                       deathent.death_msgmurder.nent_msginfo.nent_id,
+                                       deathent.death_msgmurder.nent_msginfo,
                                        s1, s2, s3, "",
                                        f1, f2, f3, 0
                                );
@@ -196,7 +196,7 @@ void Obituary_SpecialDeath(
                                        NOTIF_ONE,
                                        notif_target,
                                        MSG_MULTI,
-                                       deathent.death_msgself.nent_id,
+                                       deathent.death_msgself,
                                        s1, s2, s3, "",
                                        f1, f2, f3, 0
                                );
@@ -204,7 +204,7 @@ void Obituary_SpecialDeath(
                                        NOTIF_ALL_EXCEPT,
                                        notif_target,
                                        MSG_INFO,
-                                       deathent.death_msgself.nent_msginfo.nent_id,
+                                       deathent.death_msgself.nent_msginfo,
                                        s1, s2, s3, "",
                                        f1, f2, f3, 0
                                );
@@ -225,7 +225,7 @@ float Obituary_WeaponDeath(
        if (death_weapon != WEP_Null)
        {
                w_deathtype = deathtype;
-               int death_message = ((murder) ? death_weapon.wr_killmessage(death_weapon) : death_weapon.wr_suicidemessage(death_weapon));
+               Notification death_message = ((murder) ? death_weapon.wr_killmessage(death_weapon) : death_weapon.wr_suicidemessage(death_weapon));
                w_deathtype = false;
 
                if (death_message)
@@ -242,7 +242,7 @@ float Obituary_WeaponDeath(
                                NOTIF_ALL_EXCEPT,
                                notif_target,
                                MSG_INFO,
-                               msg_multi_notifs[death_message - 1].nent_msginfo.nent_id,
+                               msg_multi_notifs[death_message.nent_id - 1].nent_msginfo,
                                s1, s2, s3, "",
                                f1, f2, 0, 0
                        );
@@ -395,7 +395,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        CHOICE_TYPEFRAG,
                                        targ.netname,
                                        kill_count_to_attacker,
-                                       (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping)
+                                       (IS_BOT_CLIENT(targ) ? NO_MSG_ : targ.ping)
                                );
                                Send_Notification(
                                        NOTIF_ONE,
@@ -406,7 +406,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        kill_count_to_target,
                                        attacker.health,
                                        attacker.armorvalue,
-                                       (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping)
+                                       (IS_BOT_CLIENT(attacker) ? NO_MSG_ : attacker.ping)
                                );
                        }
                        else
@@ -418,7 +418,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        CHOICE_FRAG,
                                        targ.netname,
                                        kill_count_to_attacker,
-                                       (IS_BOT_CLIENT(targ) ? NO_MSG : targ.ping)
+                                       (IS_BOT_CLIENT(targ) ? NO_MSG_ : targ.ping)
                                );
                                Send_Notification(
                                        NOTIF_ONE,
@@ -429,7 +429,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                        kill_count_to_target,
                                        attacker.health,
                                        attacker.armorvalue,
-                                       (IS_BOT_CLIENT(attacker) ? NO_MSG : attacker.ping)
+                                       (IS_BOT_CLIENT(attacker) ? NO_MSG_ : attacker.ping)
                                );
                        }