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,
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,
}
}
-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)
if(is_new)
{
- Local_Notification_Without_VarArgs(
+ Local_Notification_WOVA(
net_type, net_name,
notif.nent_stringcount,
notif.nent_floatcount,
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,
}
}
-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
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);
#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);
#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 \
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)); }