]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove legacy function entirely, plus rename that one func to WOVA :D
authorSamual Lenks <samual@xonotic.org>
Fri, 22 Feb 2013 02:46:01 +0000 (21:46 -0500)
committerSamual Lenks <samual@xonotic.org>
Fri, 22 Feb 2013 02:46:01 +0000 (21:46 -0500)
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/server/g_damage.qc

index 3a50b2ff3539c8390f37d372c786b2ae40c13a82..02a9d81b0520d1211d770cce6fc1f2be71c62aab 100644 (file)
@@ -299,7 +299,7 @@ void Local_Notification(float net_type, float net_name, ...count)
                        if(notif.nent_msginfo)
                        if(notif.nent_msginfo.nent_enabled)
                        {
-                               Local_Notification_Without_VarArgs(
+                               Local_Notification_WOVA(
                                        MSG_INFO,
                                        notif.nent_msginfo.nent_id, 
                                        notif.nent_msginfo.nent_stringcount, 
@@ -311,7 +311,7 @@ void Local_Notification(float net_type, float net_name, ...count)
                        if(notif.nent_msgcenter)
                        if(notif.nent_msgcenter.nent_enabled)
                        {
-                               Local_Notification_Without_VarArgs(
+                               Local_Notification_WOVA(
                                        MSG_CENTER,
                                        notif.nent_msgcenter.nent_id, 
                                        notif.nent_msgcenter.nent_stringcount, 
@@ -325,7 +325,8 @@ void Local_Notification(float net_type, float net_name, ...count)
        }
 }
 
-void Local_Notification_Without_VarArgs(float net_type, float net_name,
+// WOVA = Without Variable Arguments 
+void Local_Notification_WOVA(float net_type, float net_name,
        float stringcount, float floatcount,
        string s1, string s2, string s3, string s4,
        float f1, float f2, float f3, float f4)
@@ -367,7 +368,7 @@ void Read_Notification(float is_new)
        
        if(is_new)
        {
-               Local_Notification_Without_VarArgs(
+               Local_Notification_WOVA(
                        net_type, net_name,
                        notif.nent_stringcount,
                        notif.nent_floatcount,
@@ -593,7 +594,7 @@ void Send_Notification(float broadcast, entity client,
 
        if((!server_is_local) && (broadcast == NOTIF_ANY || broadcast == NOTIF_ANY_EXCEPT) && (net_type != MSG_CENTER))
        {
-               Local_Notification_Without_VarArgs(
+               Local_Notification_WOVA(
                        net_type, net_name,
                        notif.nent_stringcount,
                        notif.nent_floatcount,
@@ -602,35 +603,21 @@ void Send_Notification(float broadcast, entity client,
        }
 }
 
-void Send_Notification_Without_VarArgs(float broadcast, entity client,
+// WOVA = Without Variable Arguments 
+void Send_Notification_WOVA(float broadcast, entity client,
        float net_type, float net_name,
-       float stringcount, float floatcount,
        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);
        #define VARITEM(stringc,floatc,args) \
-               if((stringcount == stringc) && (floatcount == floatc)) \
+               if((notif.nent_stringcount == stringc) && (notif.nent_floatcount == floatc)) \
                        { Send_Notification(broadcast, client, net_type, net_name, args); return; }
        EIGHT_VARS_TO_VARARGS_VARLIST
        #undef VARITEM
        Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
 }
 
-void Send_Notification_Legacy_Wrapper(float broadcast, entity client,
-       float net_type, float net_name,
-       string s1, string s2,
-       float f1, float f2, float f3)
-{
-       entity notif = Get_Notif_Ent(net_type, net_name);
-       Send_Notification_Without_VarArgs(
-               broadcast, client,
-               net_type, net_name,
-               notif.nent_stringcount,
-               notif.nent_floatcount,
-               s1, s2, "", "",
-               f1, f2, f3, 0);
-}
-
 
 // =============================
 //  LEGACY NOTIFICATION SYSTEMS
index aa4ebe1e4a3373b000521cc097971ff2ba1f26f6..e84dc6cb03f9dddf048b245ea28434b554acf9f0 100644 (file)
@@ -46,7 +46,7 @@
 void Dump_Notifications(float fh, float alsoprint);
 
 void Local_Notification(float net_type, float net_name, ...count);
-void Local_Notification_Without_VarArgs(float net_type, float net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4);
+void Local_Notification_WOVA(float net_type, float net_name, float stringcount, float floatcount, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4);
 
 #ifdef CSQC // CLIENT ONLY
 void Read_Notification(float is_new);
@@ -64,8 +64,7 @@ void Read_Notification(float is_new);
 #define IFFL(num) ((((notif.nent_stringcount-1) + num) < count) ? ...(((notif.nent_stringcount-1) + num), float) : 0)
 
 void Send_Notification(float broadcast, entity client, float net_type, float net_name, ...count);
-void Send_Notification_Without_VarArgs(float broadcast, entity client, float net_type, float 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_Legacy_Wrapper(float broadcast, entity client, float net_type, float net_name, string s1, string s2, float f1, float f2, float f3);
+void Send_Notification_WOVA(float broadcast, entity client, float net_type, float net_name, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4);
 
 void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, float countdown_num);
 void Send_CSQC_Centerprint_Generic_Expire(entity e, float id);
index a7ed958df1fae026fb257c317954a665df6101b3..86d0e7c67c3c48618811e7d07db3c80e1dd92f3d 100644 (file)
@@ -310,16 +310,16 @@ void Obituary_SpecialDeath(entity notif_target, float murder, float deathtype, s
                                #if msg_death != NO_MSG \
                                        if not(murder) \
                                        { \
-                                               Send_Notification_Legacy_Wrapper(NOTIF_ONE, notif_target, MSG_DEATH, msg_death, s1, s2, f1, f2, f3); \
-                                               Send_Notification_Legacy_Wrapper(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, INFO_##msg_death, s1, s2, f1, f2, f3); \
+                                               Send_Notification_WOVA(NOTIF_ONE, notif_target, MSG_DEATH, msg_death, s1, s2, "", "", f1, f2, f3, 0); \
+                                               Send_Notification_WOVA(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, INFO_##msg_death, s1, s2, "", "", f1, f2, f3, 0); \
                                                ++handled; \
                                        } \
                                #endif \
                                #if msg_death_by != NO_MSG \
                                        if(murder) \
                                        { \
-                                               Send_Notification_Legacy_Wrapper(NOTIF_ONE, notif_target, MSG_DEATH, msg_death_by, s1, s2, f1, f2, f3); \
-                                               Send_Notification_Legacy_Wrapper(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, INFO_##msg_death_by, s1, s2, f1, f2, f3); \
+                                               Send_Notification_WOVA(NOTIF_ONE, notif_target, MSG_DEATH, msg_death_by, s1, s2, "", "", f1, f2, f3, 0); \
+                                               Send_Notification_WOVA(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, INFO_##msg_death_by, s1, s2, "", "", f1, f2, f3, 0); \
                                                ++handled; \
                                        } \
                                #endif \
@@ -354,8 +354,8 @@ float Obituary_WeaponDeath(entity notif_target, float murder, float deathtype, s
 
                if(death_message)
                {
-                       Send_Notification_Legacy_Wrapper(NOTIF_ONE, notif_target, MSG_WEAPON, death_message, s1, s2, f1, 0, 0);
-                       Send_Notification_Legacy_Wrapper(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, msg_weapon_notifs[death_message - 1].nent_msginfo.nent_id, s1, s2, f1, 0, 0);
+                       Send_Notification_WOVA(NOTIF_ONE, notif_target, MSG_WEAPON, death_message, s1, s2, "", "", f1, 0, 0, 0);
+                       Send_Notification_WOVA(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, msg_weapon_notifs[death_message - 1].nent_msginfo.nent_id, s1, s2, "", "", f1, 0, 0, 0);
                        //print(Get_Field_Value(F_INFVAL, MSG_WEAPON, death_message), "\n");
                }
                else { dprint(sprintf("Obituary_WeaponDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification for weapon %d!\n", Deathtype_Name(deathtype), deathtype, death_weapon)); }