string output = "";
#define GET_FIELD_VALUE_OUTPUT(field,name,strnum,flnum) \
- if(field == F_NAME) { output = VAR_TO_TEXT(name); } \
- else if(field == F_STRNUM) { output = ftos(strnum); } \
- else if(field == F_FLNUM) { output = ftos(flnum); }
+ switch(field) { \
+ case F_NAME: { output = VAR_TO_TEXT(name); break; } \
+ case F_STRNUM: { output = ftos(strnum); break; } \
+ case F_FLNUM: { output = ftos(flnum); break; } }
switch(net_type)
{
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)
{
- #define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Local_Notification(net_type, net_name, args); }
+ #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
}
void Local_Notification(float net_type, float net_name, ...count)
{
float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
- if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
- else if((stringcount + floatcount) < count) { backtrace(strcat("Too many arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " < count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
-
string s1 = ((0 < stringcount) ? ...(0, string) : NO_STR_ARG);
string s2 = ((1 < stringcount) ? ...(1, string) : NO_STR_ARG);
string s3 = ((2 < stringcount) ? ...(2, string) : NO_STR_ARG);
float f3 = (((stringcount + 2) < count) ? ...((stringcount + 2), float) : NO_FL_ARG);
float f4 = (((stringcount + 3) < count) ? ...((stringcount + 3), float) : NO_FL_ARG);
- print("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("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");
+
+ if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), ")"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
+ else if((stringcount + floatcount) < count) { backtrace(strcat("Too many arguments for Local_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), ")"), " < count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
switch(net_type)
{
{ NOTIF_MATCH(name, net_name) CHECK_AUTOCVAR(name) \
{ \
#if infoname != NO_MSG \
- Local_Notification_Without_VarArgs(MSG_INFO, infoname, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+ Local_Notification_Without_VarArgs(MSG_INFO, infoname, \
+ stof(Get_Field_Value(F_STRNUM, MSG_INFO, infoname)), \
+ stof(Get_Field_Value(F_FLNUM, MSG_INFO, infoname)), \
+ s1, s2, s3, s4, f1, f2, f3, f4); \
#endif \
#ifdef CSQC \
#if centername != NO_MSG \
- Local_Notification_Without_VarArgs(MSG_CENTER, centername, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+ Local_Notification_Without_VarArgs(MSG_CENTER, centername, \
+ stof(Get_Field_Value(F_STRNUM, MSG_CENTER, centername)), \
+ stof(Get_Field_Value(F_FLNUM, MSG_CENTER, centername)), \
+ s1, s2, s3, s4, f1, f2, f3, f4); \
#endif \
#endif \
} }
{ NOTIF_MATCH(name, net_name) CHECK_AUTOCVAR(name) \
{ \
#if infoname != NO_MSG \
- Local_Notification_Without_VarArgs(MSG_INFO, infoname, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+ Local_Notification_Without_VarArgs(MSG_INFO, infoname, \
+ stof(Get_Field_Value(F_STRNUM, MSG_INFO, infoname)), \
+ stof(Get_Field_Value(F_FLNUM, MSG_INFO, infoname)), \
+ s1, s2, s3, s4, f1, f2, f3, f4); \
#endif \
#ifdef CSQC \
#if centername != NO_MSG \
- Local_Notification_Without_VarArgs(MSG_CENTER, centername, stringcount, floatcount, s1, s2, s3, s4, f1, f2, f3, f4); \
+ Local_Notification_Without_VarArgs(MSG_CENTER, centername, \
+ stof(Get_Field_Value(F_STRNUM, MSG_CENTER, centername)), \
+ stof(Get_Field_Value(F_FLNUM, MSG_CENTER, centername)), \
+ s1, s2, s3, s4, f1, f2, f3, f4); \
#endif \
#endif \
} }
float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
-
- //print("stringcount = ", ftos(stringcount), ", floatcount = ", ftos(floatcount), ".\n");
- Local_Notification(net_type, net_name,
- ((stringcount >= 1) ? ReadString() : ""),
- ((stringcount == 2) ? ReadString() : ""),
- ((floatcount >= 1) ? ReadLong() : 0),
- ((floatcount >= 2) ? ReadLong() : 0),
- ((floatcount == 3) ? ReadLong() : 0));
+ Local_Notification_Without_VarArgs(net_type, net_name,
+ stringcount, floatcount,
+ ((stringcount >= 1) ? ReadString() : NO_STR_ARG),
+ ((stringcount >= 2) ? ReadString() : NO_STR_ARG),
+ ((stringcount >= 3) ? ReadString() : NO_STR_ARG),
+ ((stringcount == 4) ? ReadString() : NO_STR_ARG),
+ ((floatcount >= 1) ? ReadLong() : NO_FL_ARG),
+ ((floatcount >= 2) ? ReadLong() : NO_FL_ARG),
+ ((floatcount >= 3) ? ReadLong() : NO_FL_ARG),
+ ((floatcount == 4) ? ReadLong() : NO_FL_ARG));
}
#endif
{
if((broadcast == MSG_BROADCAST || broadcast == MSG_ONE) && net_type && net_name)
{
- dprint("Send_Notification(", ftos(broadcast), ", ", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", ftos(count), ");\n"));
-
float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
float i, tmp_f;
string tmp_s;
- print("stringcount: ", ftos(stringcount), ", floatcount: ", ftos(floatcount), ".\n");
+ dprint("Send_Notification(", ftos(broadcast), ", ", ftos(net_type), ", ", Get_Field_Value(F_NAME, net_type, net_name), strcat(", ", ftos(count), ");\n"));
+ dprint(" ^--: stringcount: ", ftos(stringcount), ", floatcount: ", ftos(floatcount), ".\n");
- /*if(stringcount != f_stringcount) { backtrace(strcat("Incorrect string arguments for notification! stringcount: ", ftos(stringcount), ", f_stringcount: ", ftos(f_stringcount), ".\nCheck the notification definition and the function call for accuracy...?\n")); return; }
- else if(floatcount != f_floatcount) { backtrace(strcat("Incorrect float arguments for notification! floatcount: ", ftos(floatcount), ", f_floatcount: ", ftos(f_floatcount), ".\nCheck the notification definition and the function call for accuracy...?\n")); return; }
- else*/ if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Send_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
+ if((stringcount + floatcount) > count) { backtrace(strcat("Not enough arguments for Send_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " > count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
else if((stringcount + floatcount) < count) { backtrace(strcat("Too many arguments for Send_Notification! ", strcat("stringcount(", ftos(stringcount), ") + floatcount(", ftos(floatcount), "),"), " < count(", ftos(count), ").\nCheck the notification definition and the function call for accuracy...?\n")); return; }
//if(Count_Proper_Strings(NO_STR_ARG, s1, s2) > stringcount) { backtrace("Too many string arguments for notification!\n"); return; }
WriteByte(msg, net_type); \
WriteShort(msg, net_name); \
for(i = 0; i < stringcount; ++i) \
- { tmp_s = ...(i, string); WriteString(msg, tmp_s); print("WriteString(...(", ftos(i), ", string)); - ", tmp_s); } \
+ { tmp_s = ...(i, string); WriteString(msg, tmp_s); dprint("WriteString(...(", ftos(i), ", string)); - ", tmp_s, "\n"); } \
for(i = 0; i < floatcount; ++i) \
- { tmp_f = ...((stringcount + i), float); WriteLong(msg, tmp_f); print("WriteLong(...(", ftos(i), ", float)); - ", ftos(tmp_f)); }
+ { tmp_f = ...((stringcount + i), float); WriteLong(msg, tmp_f); dprint("WriteLong(...(", ftos((stringcount + i)), ", float)); - ", ftos(tmp_f), "\n"); }
switch(broadcast)
void Send_Notification_Without_VarArgs(entity client, float broadcast, 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)
{
- #define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Send_Notification(client, broadcast, net_type, net_name, args); }
+ #define VARITEM(stringc,floatc,args) if((stringcount == stringc) && (floatcount == floatc)) { Send_Notification(client, broadcast, net_type, net_name, args); return; }
EIGHT_VARS_TO_VARARGS_VARLIST
#undef VARITEM
+
+ Send_Notification(client, broadcast, net_type, net_name); // some notifications don't have any arguments at all
+}
+
+void Send_Notification_Legacy_Wrapper(entity client, float broadcast, float net_type, float net_name, string s1, string s2, float f1, float f2, float f3)
+{
+ float stringcount = stof(Get_Field_Value(F_STRNUM, net_type, net_name));
+ float floatcount = stof(Get_Field_Value(F_FLNUM, net_type, net_name));
+ Send_Notification_Without_VarArgs(client, broadcast, net_type, net_name, stringcount, floatcount, s1, s2, NO_STR_ARG, NO_STR_ARG, f1, f2, f3, NO_FL_ARG);
}
void Send_Notification_ToTeam(float targetteam, entity except, float net_type, float net_name, ...count)
#if msg_death != NO_MSG \
if not(murder) \
{ \
- Send_Notification(notif_target, MSG_ONE, MSG_DEATH, msg_death, s1, s2, f1, f2, f3); \
+ Send_Notification_Legacy_Wrapper(notif_target, MSG_ONE, MSG_DEATH, msg_death, s1, s2, f1, f2, f3); \
Send_Notification_ToAll(notif_target, TRUE, MSG_INFO, INFO_##msg_death, s1, s2, f1, f2, f3); \
++handled; \
} \
#if msg_death_by != NO_MSG \
if(murder) \
{ \
- Send_Notification(notif_target, MSG_ONE, MSG_DEATH, msg_death_by, s1, s2, f1, f2, f3); \
+ Send_Notification_Legacy_Wrapper(notif_target, MSG_ONE, MSG_DEATH, msg_death_by, s1, s2, f1, f2, f3); \
Send_Notification_ToAll(notif_target, TRUE, MSG_INFO, INFO_##msg_death_by, s1, s2, f1, f2, f3); \
++handled; \
} \
float death_message = weapon_action(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
w_deathtype = FALSE;
- if(death_message) { Send_Notification(world, MSG_BROADCAST, MSG_WEAPON, death_message, s1, s2, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
+ if(death_message) { Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_WEAPON, death_message, s1, s2, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
else { dprint(sprintf("Obituary_WeaponDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification for weapon %d!\n", Deathtype_Name(deathtype), deathtype, death_weapon)); }
return TRUE;
attacker.killcount = 0;
- Send_Notification(attacker, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAG, s2, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(targ, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAGGED, s1, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(targ.team, INFO_DEATH_TEAMKILL_), s2, s1, targ.killcount, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAG, s2, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, DEATH_TEAMKILL_FRAGGED, s1, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(targ.team, INFO_DEATH_TEAMKILL_), s2, s1, targ.killcount, NO_FL_ARG, NO_FL_ARG);
// In this case, the death message will ALWAYS be "foo was betrayed by bar"
// No need for specific death/weapon messages...
{
if(targ.istypefrag)
{
- Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAG_FIRST),
+ Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAG_FIRST),
s2, s1, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG, NO_FL_ARG);
- Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAGGED_FIRST),
+ Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_FIRST_VERBOSE : DEATH_MURDER_TYPEFRAGGED_FIRST),
s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
}
else
{
- Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_FIRST_VERBOSE : DEATH_MURDER_FRAG_FIRST),
+ Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_FIRST_VERBOSE : DEATH_MURDER_FRAG_FIRST),
s2, s1, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG, NO_FL_ARG);
- Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_FIRST_VERBOSE : DEATH_MURDER_FRAGGED_FIRST),
+ Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_FIRST_VERBOSE : DEATH_MURDER_FRAGGED_FIRST),
s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
}
}
{
if(targ.istypefrag)
{
- Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_VERBOSE : DEATH_MURDER_TYPEFRAG),
+ Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAG_VERBOSE : DEATH_MURDER_TYPEFRAG),
s2, NO_STR_ARG, attacker.killcount, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG);
- Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_VERBOSE : DEATH_MURDER_TYPEFRAGGED),
+ Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_TYPEFRAGGED_VERBOSE : DEATH_MURDER_TYPEFRAGGED),
s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
}
else
{
- Send_Notification(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_VERBOSE : DEATH_MURDER_FRAG),
+ Send_Notification_Legacy_Wrapper(attacker, MSG_ONE, MSG_DEATH, (attacker.FRAG_VERBOSE ? DEATH_MURDER_FRAG_VERBOSE : DEATH_MURDER_FRAG),
s2, NO_STR_ARG, attacker.killcount, (attacker.FRAG_VERBOSE ? ((clienttype(targ) == CLIENTTYPE_BOT) ? BOT_PING : targ.ping) : NO_FL_ARG), NO_FL_ARG);
- Send_Notification(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_VERBOSE : DEATH_MURDER_FRAGGED),
+ Send_Notification_Legacy_Wrapper(targ, MSG_ONE, MSG_DEATH, (targ.FRAG_VERBOSE ? DEATH_MURDER_FRAGGED_VERBOSE : DEATH_MURDER_FRAGGED),
s1, NO_STR_ARG, (targ.FRAG_VERBOSE ? attacker.health : NO_FL_ARG), (targ.FRAG_VERBOSE ? attacker.armorvalue : NO_FL_ARG), (targ.FRAG_VERBOSE ? ((clienttype(attacker) == CLIENTTYPE_BOT) ? BOT_PING : attacker.ping) : NO_FL_ARG));
}
}
FOR_EACH_REALCLIENT(tmp_entity)
{
if not(tmp_entity.CAPTURE_VERBOSE) { notification = APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_); s2 = NO_STR_ARG; f1 = f2 = NO_FL_ARG; }
- Send_Notification(tmp_entity, MSG_ONE, MSG_INFO, notification, s1, s2, f1, f2, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_entity, MSG_ONE, MSG_INFO, notification, s1, s2, f1, f2, NO_FL_ARG);
}
// write that shit in the database
if((wanted_status == player.ctf_captureshielded) && (updated_status != wanted_status)) // 0: shield only, 1: unshield only
{
if(updated_status) // TODO csqc notifier for this // Samual: How?
- Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
else
- Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_FREE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_FREE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
player.ctf_captureshielded = updated_status;
}
vector othermid = (other.absmin + other.absmax) * 0.5;
Damage(other, self, self, 0, DEATH_HURTTRIGGER, mymid, normalize(othermid - mymid) * ctf_captureshield_force);
- Send_Notification(other, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(other, MSG_ONE, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
void ctf_CaptureShield_Spawn(entity flag)
flag.ctf_status = FLAG_DROPPED;
// messages and sounds
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
sound(flag, CH_TRIGGER, flag.snd_flag_dropped, VOL_BASE, ATTN_NONE);
ctf_EventLog("dropped", player.team, player);
FOR_EACH_REALPLAYER(tmp_player)
{
if(tmp_player == sender)
- Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_SENT_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_SENT_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
else if(tmp_player == player)
- Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_RECEIVED_), sender.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_RECEIVED_), sender.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
else if(!IsDifferentTeam(tmp_player, sender))
- Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
// create new waypoint
void ctf_Handle_Return(entity flag, entity player)
{
// messages and sounds
- Send_Notification(player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_RETURN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_RETURN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_RETURN_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
sound(player, CH_TRIGGER, flag.snd_flag_returned, VOL_BASE, ATTN_NONE);
ctf_EventLog("return", flag.team, player);
}
// messages and sounds
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTN_NONE);
FOR_EACH_REALPLAYER(tmp_player)
{
if(tmp_player == player)
{
- Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- if(ctf_stalemate) { Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
+ Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ if(ctf_stalemate) { Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
}
else if(!IsDifferentTeam(tmp_player, player) && tmp_player != player)
- Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_TEAM_VERBOSE ? CENTER_CTF_PICKUP_TEAM_VERBOSE : CENTER_CTF_PICKUP_TEAM), Team_ColorCode(player.team), (tmp_player.PICKUP_TEAM_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_TEAM_VERBOSE ? CENTER_CTF_PICKUP_TEAM_VERBOSE : CENTER_CTF_PICKUP_TEAM), Team_ColorCode(player.team), (tmp_player.PICKUP_TEAM_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
else if(IsDifferentTeam(tmp_player, player))
- Send_Notification(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_ENEMY_VERBOSE ? CENTER_CTF_PICKUP_ENEMY_VERBOSE : CENTER_CTF_PICKUP_ENEMY), Team_ColorCode(player.team), (tmp_player.PICKUP_ENEMY_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_player, MSG_ONE, MSG_CENTER, (tmp_player.PICKUP_ENEMY_VERBOSE ? CENTER_CTF_PICKUP_ENEMY_VERBOSE : CENTER_CTF_PICKUP_ENEMY), Team_ColorCode(player.team), (tmp_player.PICKUP_ENEMY_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
// scoring
{
switch(returntype)
{
- case RETURN_DROPPED: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DROPPED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
- case RETURN_DAMAGE: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
- case RETURN_SPEEDRUN: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), NO_STR_ARG, NO_STR_ARG, ctf_captimerecord, NO_FL_ARG, NO_FL_ARG); break;
- case RETURN_NEEDKILL: Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
+ case RETURN_DROPPED: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DROPPED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
+ case RETURN_DAMAGE: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
+ case RETURN_SPEEDRUN: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), NO_STR_ARG, NO_STR_ARG, ctf_captimerecord, NO_FL_ARG, NO_FL_ARG); break;
+ case RETURN_NEEDKILL: Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break;
default:
case RETURN_TIMEOUT:
- { Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break; }
+ { Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); break; }
}
sound(flag, CH_TRIGGER, flag.snd_flag_respawn, VOL_BASE, ATTN_NONE);
ctf_EventLog("returned", flag.team, world);
{
FOR_EACH_REALPLAYER(tmp_entity)
if(tmp_entity.flagcarried)
- Send_Notification(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
else
- Send_Notification(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_OTHER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(tmp_entity, MSG_ONE, MSG_CENTER, CENTER_CTF_STALEMATE_OTHER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
wpforenemy_announced = TRUE;
}
{
if(clienttype(head) == CLIENTTYPE_BOT)
{
- Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
ctf_Handle_Throw(head, player, DROP_PASS);
}
else
{
- Send_Notification(head, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(head, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
player.throw_antispam = time + autocvar_g_ctf_pass_wait;
return TRUE;
}
else
{
- Send_Notification(player, MSG_ONE, MSG_CENTER, CENTER_CTF_FLAG_THROW_PUNISH, NO_STR_ARG, NO_STR_ARG, rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time), NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(player, MSG_ONE, MSG_CENTER, CENTER_CTF_FLAG_THROW_PUNISH, NO_STR_ARG, NO_STR_ARG, rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time), NO_FL_ARG, NO_FL_ARG);
return FALSE;
}
}
{
if(self.flagcarried)
{
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_ENT_2(self.flagcarried, INFO_CTF_FLAGRETURN_ABORTRUN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
ctf_RespawnFlag(self.flagcarried);
return TRUE;
}
if(winner != world) // just in case a winner wasn't found
{
- Send_Notification(world, MSG_BROADCAST, MSG_CENTER, APP_TEAM_NUM_4(winner.team, CENTER_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(winner.team, INFO_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_CENTER, APP_TEAM_NUM_4(winner.team, CENTER_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, APP_TEAM_NUM_4(winner.team, INFO_FREEZETAG_ROUND_WIN_), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
}
if(frag_attacker == frag_target || frag_attacker == world)
{
if(frag_target.classname == STR_PLAYER)
- Send_Notification(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SELF, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_SELF, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SELF, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_SELF, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
else
{
if(frag_target.classname == STR_PLAYER)
- Send_Notification(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FROZEN, frag_attacker.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(frag_target, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FROZEN, frag_attacker.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
if(frag_attacker.classname == STR_PLAYER)
- Send_Notification(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FREEZE, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_FREEZE, frag_target.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
frag_target.health = 1; // "respawn" the player :P
}
if(warmup && time > warmup) // spawn too late, freeze player
{
- Send_Notification(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SPAWN_LATE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_SPAWN_LATE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
freezetag_Freeze(world);
}
}
}
- Send_Notification(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVED, o.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(o, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVE, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_REVIVE, self.netname, o.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(self, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVED, o.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(o, MSG_ONE, MSG_CENTER, CENTER_FREEZETAG_REVIVE, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_FREEZETAG_REVIVE, self.netname, o.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
// now find EVERY teammate within reviving radius, set their revive_progress values correct
// messages and sounds
ka_EventLog("pickup", other);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere)
// scoring
// messages and sounds
ka_EventLog("dropped", plyr);
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
- Send_Notification(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
sound(other, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere)
// scoring
}
else if(!frag_attacker.ballcarried)
if(autocvar_g_keepaway_noncarrier_warn)
- Send_Notification(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_KEEPAWAY_WARN, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(frag_attacker, MSG_ONE, MSG_CENTER, CENTER_KEEPAWAY_WARN, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
if(frag_attacker.ballcarried) // add to amount of kills while ballcarrier
PlayerScore_Add(frag_attacker, SP_SCORE, autocvar_g_keepaway_score_killac);
recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - oldrec), "]");
bprint(mynetname, "^7 couldn't break their ", race_placeName(player_prevpos), " place record of ", TIME_ENCODED_TOSTRING(oldrec), recorddifference, "\n");
race_SendStatus(0, e); // "fail"
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
return;
} else if (!newpos) { // no ranking, time worse than the worst ranked
recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - race_readTime(GetMapname(), RANKINGS_CNT)), "]");
bprint(mynetname, "^7 couldn't break the ", race_placeName(RANKINGS_CNT), " place record of ", TIME_ENCODED_TOSTRING(race_readTime(GetMapname(), RANKINGS_CNT)), recorddifference, "\n");
race_SendStatus(0, e); // "fail"
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_FAIL, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
return;
}
bprint(mynetname, "^1 broke ", oldrec_holder, "^1's 1st place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
}
race_SendStatus(3, e); // "new server record"
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RECORD, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RECORD, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
} else {
if(newpos == player_prevpos) {
recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
bprint(mynetname, "^5 improved their ", race_placeName(newpos), " ^5place record with ", TIME_ENCODED_TOSTRING(t), recorddifference, "\n");
race_SendStatus(1, e); // "new time"
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_TIME, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_TIME, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
} else if (oldrec == 0) {
bprint(mynetname, "^2 set the ", race_placeName(newpos), " ^2place record with ", TIME_ENCODED_TOSTRING(t), "\n");
race_SendStatus(2, e); // "new rank"
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
} else {
recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]");
bprint(mynetname, "^2 broke ", oldrec_holder, "^2's ", race_placeName(newpos), " ^2place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n"));
race_SendStatus(2, e); // "new rank"
- Send_Notification(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ Send_Notification_Legacy_Wrapper(world, MSG_BROADCAST, MSG_INFO, INFO_RACE_NEW_RANK, e.netname, TIME_ENCODED_TOSTRING(t), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
}