From ef5e40e2ce9be644b0bf411e532e57b201d531c0 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Wed, 20 Feb 2013 16:34:49 -0500 Subject: [PATCH] More cleanup --- qcsrc/common/notifications.qc | 4 +- qcsrc/common/notifications.qh | 77 +++++++++++++++++++++++++++++------ 2 files changed, 67 insertions(+), 14 deletions(-) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 77ce75f2b..9c6159d60 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -274,7 +274,9 @@ void Local_Notification_Without_VarArgs(float net_type, float net_name, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4) { - #define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Local_Notification(net_type, net_name, args); return; } + #define VARITEM(stringc,floatc,args) \ + if((stringcount == stringc) && (floatcount == floatc)) \ + { Local_Notification(net_type, net_name, args); return; } EIGHT_VARS_TO_VARARGS_VARLIST #undef VARITEM Local_Notification(net_type, net_name); // some notifications don't have any arguments at all diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index c9228a591..3822adf84 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -711,7 +711,6 @@ string Process_Notif_Args(float is_hudargs, string args, string notiftype, strin notif_global_error = TRUE; \ } - #define MSG_INFO_NOTIF(name,strnum,flnum,args,hudargs,icon,normal,gentle) \ ADD_AUTOCVAR(name) \ float name; \ @@ -719,9 +718,22 @@ string Process_Notif_Args(float is_hudargs, string args, string notiftype, strin { \ SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \ CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_INFO_COUNT, "notifications") \ - CREATE_NOTIF_ENTITY(info, name, NO_MSG, NO_MSG, \ - strnum, flnum, args, hudargs, icon, NO_MSG, NO_MSG, \ - normal, gentle, 1, 0) \ + CREATE_NOTIF_ENTITY( \ + info, /* type */ \ + name, /* name */ \ + NO_MSG, /* infoname */ \ + NO_MSG, /* centername */ \ + strnum, /* strnum */ \ + flnum, /* flnum */ \ + args, /* args */ \ + hudargs, /* hudargs */ \ + icon, /* icon */ \ + NO_MSG, /* cpid */ \ + NO_MSG, /* durcnt */ \ + normal, /* normal */ \ + gentle, /* gentle */ \ + 1, /* check_newline */ \ + 0) /* subcalls */ \ } \ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name) @@ -734,9 +746,22 @@ string Process_Notif_Args(float is_hudargs, string args, string notiftype, strin SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CENTER_COUNT) \ SET_FIELD_COUNT(cpid, NOTIF_FIRST, NOTIF_CPID_COUNT) \ CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_CENTER_COUNT, "notifications") \ - CREATE_NOTIF_ENTITY(center, name, NO_MSG, NO_MSG, \ - strnum, flnum, args, "", "", cpid, durcnt, \ - normal, gentle, 0, 0) \ + CREATE_NOTIF_ENTITY( \ + center, /* type */ \ + name, /* name */ \ + NO_MSG, /* infoname */ \ + NO_MSG, /* centername */ \ + strnum, /* strnum */ \ + flnum, /* flnum */ \ + args, /* args */ \ + "", /* hudargs */ \ + "", /* icon */ \ + cpid, /* cpid */ \ + durcnt, /* durcnt */ \ + normal, /* normal */ \ + gentle, /* gentle */ \ + 0, /* check_newline */ \ + 0) /* subcalls */ \ } \ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name) @@ -747,9 +772,22 @@ string Process_Notif_Args(float is_hudargs, string args, string notiftype, strin { \ SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_WEAPON_COUNT) \ CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_WEAPON_COUNT, "notifications") \ - CREATE_NOTIF_ENTITY(weapon, name, infoname, centername, \ - NO_MSG, NO_MSG, "", "", "", NO_MSG, NO_MSG, \ - "", "", 0, 1) \ + CREATE_NOTIF_ENTITY( \ + weapon, /* type */ \ + name, /* name */ \ + infoname, /* infoname */ \ + centername, /* centername */ \ + NO_MSG, /* strnum */ \ + NO_MSG, /* flnum */ \ + "", /* args */ \ + "", /* hudargs */ \ + "", /* icon */ \ + NO_MSG, /* cpid */ \ + NO_MSG, /* durcnt */ \ + "", /* normal */ \ + "", /* gentle */ \ + 0, /* check_newline */ \ + 1) /* subcalls */ \ } \ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name) @@ -760,9 +798,22 @@ string Process_Notif_Args(float is_hudargs, string args, string notiftype, strin { \ SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_DEATH_COUNT) \ CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_DEATH_COUNT, "notifications") \ - CREATE_NOTIF_ENTITY(death, name, infoname, centername, \ - NO_MSG, NO_MSG, "", "", "", NO_MSG, NO_MSG, \ - "", "", 0, 1) \ + CREATE_NOTIF_ENTITY( \ + death, /* type */ \ + name, /* name */ \ + infoname, /* infoname */ \ + centername, /* centername */ \ + NO_MSG, /* strnum */ \ + NO_MSG, /* flnum */ \ + "", /* args */ \ + "", /* hudargs */ \ + "", /* icon */ \ + NO_MSG, /* cpid */ \ + NO_MSG, /* durcnt */ \ + "", /* normal */ \ + "", /* gentle */ \ + 0, /* check_newline */ \ + 1) /* subcalls */ \ } \ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name) -- 2.39.2