float f2 = (((stringcount + 1) < count) ? ...((stringcount + 1), float) : NO_FL_ARG);
float f3 = (((stringcount + 2) < count) ? ...((stringcount + 2), float) : NO_FL_ARG);
float f4 = (((stringcount + 3) < count) ? ...((stringcount + 3), float) : NO_FL_ARG);
-
- string tmp_s;
dprint("Local_Notification(", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", s1, ", ", s2, ", ", s3, ", ", s4, ", "), strcat(ftos(f1), strcat(", ", ftos(f2), ", ", ftos(f3), ", ", ftos(f4), ");\n")));
dprint(" ^--: stringcount: ", ftos(stringcount), ", floatcount: ", ftos(floatcount), ".\n");
#define MSG_INFO_NOTIF(name,strnum,flnum,args,hudargs,icon,normal,gentle) \
case name: { CHECK_AUTOCVAR(name) \
{ \
- tmp_s = normal_or_gentle(normal, gentle); if(tmp_s != "") \
- { \
- if(substring(tmp_s, (strlen(tmp_s) - 1), 1) == "\n") { print(sprintf(CCR(tmp_s), args)); } \
- else { backtrace(strcat("^1MISSING/BROKEN NEW LINE AT END OF NOTIFICATION: ^7net_type = MSG_INFO, net_name = ", Get_Field_Value(F_NAME, net_type, net_name), (GENTLE ? ", GENTLE string" : ", NORMAL string"), ".\n")); } \
- #ifdef CSQC \
- tmp_s = icon; if(tmp_s != "") { HUD_Notify_Push(icon, hudargs); } \
- #endif \
- } \
- else { backtrace(strcat("^1EMPTY NOTIFICATION: ^7net_type = MSG_INFO, net_name = ", Get_Field_Value(F_NAME, net_type, net_name), ".\n")); } \
- } } break;
+ print(sprintf(CCR(normal_or_gentle(normal, gentle)), args)); \
+ #ifdef CSQC \
+ if(icon != "") { HUD_Notify_Push(icon, hudargs); } \
+ #endif \
+ } return; }
switch(net_name)
{
#define MSG_CENTER_NOTIF(name,strnum,flnum,args,cpid,durcnt,normal,gentle) \
case name: { CHECK_AUTOCVAR(name) \
{ \
- tmp_s = normal_or_gentle(normal, gentle); if(tmp_s != "") { centerprint_generic(HANDLE_CPID(cpid), sprintf(CCR(tmp_s), args), durcnt); } \
- else { backtrace(strcat("^1EMPTY NOTIFICATION: ^7net_type = MSG_CENTER, net_name = ", Get_Field_Value(F_NAME, net_type, net_name), ".\n")); } \
- } } break;
+ centerprint_generic(HANDLE_CPID(cpid), sprintf(CCR(normal_or_gentle(normal, gentle)), args), durcnt); \
+ } return; }
switch(net_name)
{
s1, s2, s3, s4, f1, f2, f3, f4); \
#endif \
#endif \
- } } break;
+ } return; }
switch(net_name)
{
case MSG_DEATH:
{
#define MSG_DEATH_NOTIF(name,infoname,centername) \
- { if(min(name,10000) == net_name) CHECK_AUTOCVAR(name) \
+ case name: { CHECK_AUTOCVAR(name) \
{ \
#if infoname != NO_MSG \
Local_Notification_Without_VarArgs(MSG_INFO, infoname, \
s1, s2, s3, s4, f1, f2, f3, f4); \
#endif \
#endif \
- } }
-
- MSG_DEATH_NOTIFICATIONS
+ } return; }
+ switch(net_name)
+ {
+ MSG_DEATH_NOTIFICATIONS
+ default: { backtrace(strcat("^1NOTIFICATION HAD NO MATCH: ^7net_type = MSG_DEATH, net_name = ", ftos(net_name), ".\n")); break; }
+ }
#undef MSG_DEATH_NOTIF
break;
MSG_INFO_NOTIF(prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \
#endif
#define MSG_INFO_NOTIFICATIONS \
- MSG_INFO_NOTIF(INFO_EMPTY, 0, 0, NO_STR_ARG, XPD("", ""), "", "", "") \
+ MSG_INFO_NOTIF(INFO_EMPTY, 0, 0, NO_STR_ARG, XPD("", ""), "", "empty", "") \
MULTITEAM_INFO(INFO_CTF_FLAGRETURN_DROPPED_, 2, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself\n"), "") \
MULTITEAM_INFO(INFO_CTF_FLAGRETURN_DAMAGED_, 2, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^BGThe ^TC^TT^BG flag was destroyed and returned to base\n"), "") \
MULTITEAM_INFO(INFO_CTF_FLAGRETURN_SPEEDRUN_, 2, 0, 1, f1/100, XPD("", ""), "", _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself\n"), "") \
MSG_CENTER_NOTIF(prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \
#endif
#define MSG_CENTER_NOTIFICATIONS \
- MSG_CENTER_NOTIF(CENTER_EMPTY, 0, 0, NO_STR_ARG, NO_CPID, XPD(0, 0), "", "") \
+ MSG_CENTER_NOTIF(CENTER_EMPTY, 0, 0, NO_STR_ARG, NO_CPID, XPD(0, 0), "null", "") \
MSG_CENTER_NOTIF(CENTER_ASSAULT_ATTACKING, 0, 0, NO_STR_ARG, CPID_ASSAULT_ROLE, XPD(0, 0), _("^BGYou are attacking!"), "") \
MSG_CENTER_NOTIF(CENTER_ASSAULT_DEFENDING, 0, 0, NO_STR_ARG, CPID_ASSAULT_ROLE, XPD(0, 0), _("^BGYou are defending!"), "") \
MSG_CENTER_NOTIF(CENTER_CTF_CAPTURESHIELD_SHIELDED, 0, 0, NO_STR_ARG, CPID_CTF_CAPSHIELD, XPD(0, 0), _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \
#define NOTIF_FIRST 1
#define NOTIF_MAX 1024 // limit of recursive functions with ACCUMULATE_FUNCTION
-
#define CHECK_NOTIFICATION_1(net_type,net_name,check_newline,normal,gentle) \
if((normal == "") || ((normal == "") && (gentle == ""))) { print(strcat("^1EMPTY NOTIFICATION: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ".\n")); } \
#if check_newline \
} \
#endif
-#define CHECK_NOTIFICATION_2(net_type,net_name,infoname,centername) \
- if not(#infoname || #centername) { print(strcat("^1NOTIFICATION WITH NO SUBCALLS: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ".\n")); }
+#define CHECK_NOTIFICATION_2(net_type,net_name,infoname,centername) if not(#infoname || #centername) { print(strcat("^1NOTIFICATION WITH NO SUBCALLS: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ".\n")); }
float NOTIF_INFO_COUNT;
float NOTIF_CENTER_COUNT;
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_INFO_COUNT, "notifications") \
- CHECK_NOTIFICATION_1("MSG_INFO", name, TRUE, normal, gentle) \
+ /*CHECK_NOTIFICATION_1("MSG_INFO", name, TRUE, normal, gentle)*/ \
} \
ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
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") \
- CHECK_NOTIFICATION_1("MSG_CENTER", name, FALSE, normal, gentle) \
+ /*CHECK_NOTIFICATION_1("MSG_CENTER", name, FALSE, normal, gentle)*/ \
} \
ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_WEAPON_COUNT) \
CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_WEAPON_COUNT, "notifications") \
- CHECK_NOTIFICATION_2("MSG_WEAPON", name, infoname, centername) \
+ /*CHECK_NOTIFICATION_2("MSG_WEAPON", name, infoname, centername)*/ \
} \
ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_DEATH_COUNT) \
CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_DEATH_COUNT, "notifications") \
- CHECK_NOTIFICATION_2("MSG_DEATH", name, infoname, centername) \
+ /*CHECK_NOTIFICATION_2("MSG_DEATH", name, infoname, centername)*/ \
} \
ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)