3 #include <client/announcer.qh>
6 #include <common/constants.qh>
7 #include <common/net_linked.qh>
8 #include <common/teams.qh>
9 #include <server/autocvars.qh>
10 #include <server/constants.qh>
11 #include <server/defs.qh>
12 #include <server/mutators/_mod.qh>
15 // ================================================
16 // Unified notification system, written by Samual
17 // Last updated: August, 2013
18 // ================================================
21 string Notification_CheckArgs(
22 NOTIF broadcast, entity client)
24 // check supplied broadcast and target for errors
30 if (IS_NOT_A_CLIENT(client)) {
31 return "No client provided!";
36 case NOTIF_ALL_EXCEPT:
38 if (IS_NOT_A_CLIENT(client)) {
39 return "Exception can't be a non-client!";
47 return "Entity provided when NULL was required!";
55 return "Teamplay not active!";
56 } else if (!client.team) {
57 // checkargs = sprintf("%sNo team provided!", checkargs);
62 case NOTIF_TEAM_EXCEPT:
65 return "Teamplay not active!";
66 } else if (IS_NOT_A_CLIENT(client)) {
67 return "Exception can't be a non-client!";
74 return sprintf("Improper broadcast: %d!", broadcast);
80 bool Notification_ShouldSend(NOTIF broadcast, entity to_client, entity other_client)
86 (to_client == other_client)
88 (IS_SPEC(to_client) && (to_client.enemy == other_client))
91 return (to_client == other_client);
94 (to_client.team == other_client.team)
99 (to_client.enemy.team == other_client.team)
102 case NOTIF_TEAM_EXCEPT:
104 (to_client != other_client)
107 (to_client.team == other_client.team)
113 (to_client.enemy != other_client)
115 (to_client.enemy.team == other_client.team)
122 case NOTIF_ALL_EXCEPT:
124 (to_client != other_client)
129 (to_client.enemy == other_client)
139 // ===============================
140 // Initialization Core Functions
141 // ===============================
143 // used by restartnotifs command to initialize notifications
144 void Destroy_Notification_Entity(entity notif)
146 if (notif.nent_name != "") strunzone(notif.nent_name);
147 if (notif.nent_snd != "") strunzone(notif.nent_snd);
148 if (notif.nent_args != "") strunzone(notif.nent_args);
149 if (notif.nent_hudargs != "") strunzone(notif.nent_hudargs);
150 if (notif.nent_icon != "") strunzone(notif.nent_icon);
151 if (notif.nent_durcnt != "") strunzone(notif.nent_durcnt);
152 if (notif.nent_string != "") strunzone(notif.nent_string);
156 void Destroy_All_Notifications()
158 // kill all networked notifications and centerprints
160 Kill_Notification(NOTIF_ALL, NULL, MSG_Null, CPID_Null);
162 reset_centerprint_messages();
165 // kill all real notification entities
166 FOREACH(Notifications, true, { Destroy_Notification_Entity(it); });
169 string Process_Notif_Line(
178 if(typeId == MSG_INFO)
180 if((chat && autocvar_notification_allow_chatboxprint)
181 || (autocvar_notification_allow_chatboxprint == 2))
183 // pass 1: add ETX char at beginning of line
184 input = strcat("\{3}", input);
186 // pass 2: add ETX char at end of each new line (so that
187 // messages with multiple lines are put through chatbox too)
188 input = strreplace("\n", "\n\{3}", input);
190 // pass 3: strip trailing ETX char
191 if(substring(input, (strlen(input) - 1), 1) == "\{3}")
192 { input = substring(input, 0, (strlen(input) - 1)); }
197 // done to both MSG_INFO and MSG_CENTER
198 if(substring(input, (strlen(input) - 1), 1) == "\n")
202 "^1TRAILING NEW LINE AT END OF NOTIFICATION: "
203 "^7net_type = %s, net_name = %s, string = %s."
210 input = substring(input, 1, (strlen(input) - 1));
216 string Process_Notif_Args(
222 string selected, remaining = args;
225 for (;(remaining != "");)
227 selected = car(remaining); remaining = cdr(remaining);
231 case 1: // normal args
233 if(sel_num == NOTIF_MAX_ARGS)
237 "^1NOTIFICATION HAS TOO MANY ARGUMENTS: "
238 "^7net_type = %s, net_name = %s, max args = %d."
248 switch(strtolower(selected))
250 #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: ++sel_num; break;
251 #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: ++sel_num; break;
252 #define ARG_CASE_ARG_CS_SV(selected,result) case selected: ++sel_num; break;
253 #define ARG_CASE_ARG_CS(selected,result) case selected: ++sel_num; break;
254 #define ARG_CASE_ARG_SV(selected,result) case selected: ++sel_num; break;
255 #define ARG_CASE_ARG_DC(selected,result)
256 #define ARG_CASE(prog,selected,result) ARG_CASE_##prog(selected,result)
259 #undef ARG_CASE_ARG_DC
260 #undef ARG_CASE_ARG_SV
261 #undef ARG_CASE_ARG_CS
262 #undef ARG_CASE_ARG_CS_SV
263 #undef ARG_CASE_ARG_CS_SV_DC
264 #undef ARG_CASE_ARG_CS_SV_HA
269 "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: "
270 "^7net_type = %s, net_name = %s, args arg = '%s'."
284 if(sel_num == NOTIF_MAX_HUDARGS)
288 "^1NOTIFICATION HAS TOO MANY ARGUMENTS: "
289 "^7net_type = %s, net_name = %s, max hudargs = %d."
299 switch(strtolower(selected))
301 #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: ++sel_num; break;
302 #define ARG_CASE_ARG_CS_SV_DC(selected,result)
303 #define ARG_CASE_ARG_CS_SV(selected,result)
304 #define ARG_CASE_ARG_CS(selected,result)
305 #define ARG_CASE_ARG_SV(selected,result)
306 #define ARG_CASE_ARG_DC(selected,result)
307 #define ARG_CASE(prog,selected,result) ARG_CASE_##prog(selected,result)
310 #undef ARG_CASE_ARG_DC
311 #undef ARG_CASE_ARG_SV
312 #undef ARG_CASE_ARG_CS
313 #undef ARG_CASE_ARG_CS_SV
314 #undef ARG_CASE_ARG_CS_SV_DC
315 #undef ARG_CASE_ARG_CS_SV_HA
320 "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: "
321 "^7net_type = %s, net_name = %s, hudargs arg = '%s'."
335 if(sel_num == NOTIF_MAX_DURCNT)
339 "^1NOTIFICATION HAS TOO MANY ARGUMENTS: "
340 "^7net_type = %s, net_name = %s, max durcnt = %d."
350 switch(strtolower(selected))
352 #define ARG_CASE_ARG_CS_SV_HA(selected,result)
353 #define ARG_CASE_ARG_CS_SV_DC(selected,result) case selected: ++sel_num; break;
354 #define ARG_CASE_ARG_CS_SV(selected,result)
355 #define ARG_CASE_ARG_CS(selected,result)
356 #define ARG_CASE_ARG_SV(selected,result)
357 #define ARG_CASE_ARG_DC(selected,result) case selected: ++sel_num; break;
358 #define ARG_CASE(prog,selected,result) ARG_CASE_##prog(selected,result)
361 #undef ARG_CASE_ARG_DC
362 #undef ARG_CASE_ARG_SV
363 #undef ARG_CASE_ARG_CS
364 #undef ARG_CASE_ARG_CS_SV
365 #undef ARG_CASE_ARG_CS_SV_DC
366 #undef ARG_CASE_ARG_CS_SV_HA
369 if(ftos(stof(selected)) != "") { ++sel_num; }
374 "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: "
375 "^7net_type = %s, net_name = %s, durcnt arg = '%s'."
393 void Create_Notification_Entity(entity notif,
400 // =====================
401 // Global Entity Setup
402 // =====================
403 notif.nent_default = var_default;
404 notif.nent_enabled = (var_cvar >= 1);
405 notif.nent_type = typeId;
406 notif.nent_name = strzone(namestring);
407 notif.nent_teamnum = teamnum;
409 // Other pre-notif-setup requisites
423 "^1NOTIFICATION WITH IMPROPER TYPE: "
424 "^7net_type = %d, net_name = %s."
433 // now check to see if any errors happened
436 notif.nent_enabled = false; // disable the notification so it can't cause trouble
437 notif_global_error = true; // throw the red flag that an error happened on init
441 #define AnnouncerFilename(snd) sprintf("announcer/%s/%s.wav", AnnouncerOption(), snd)
443 void Create_Notification_Entity_Annce(entity notif,
452 // Set MSG_ANNCE information and handle precaching
454 MSG typeId = MSG_ANNCE;
455 if (!(GENTLE && (var_cvar == 1)))
459 if(notif.nent_enabled)
461 precache_sound(AnnouncerFilename(snd));
462 notif.nent_channel = channel;
463 notif.nent_snd = strzone(snd);
464 notif.nent_vol = vol;
465 notif.nent_position = position;
470 string typestring = Get_Notif_TypeName(typeId);
473 "^1NOTIFICATION WITH NO SOUND: "
474 "^7net_type = %s, net_name = %s."
482 else { notif.nent_enabled = false; }
484 notif.nent_enabled = false;
489 void Create_Notification_Entity_InfoCenter(entity notif,
494 /* MSG_INFO & MSG_CENTER */
503 MSG typeId = notif.nent_type;
504 // Set MSG_INFO and MSG_CENTER string/float counts
505 notif.nent_stringcount = strnum;
506 notif.nent_floatcount = flnum;
508 // Only initialize arguments if we're either a client or on a dedicated server
510 float should_process_args = server_is_dedicated;
512 float should_process_args = true;
514 string typestring = Get_Notif_TypeName(typeId);
515 if(should_process_args)
517 // ========================
518 // Process Main Arguments
519 // ========================
524 notif.nent_args = strzone(
525 Process_Notif_Args(1, args, typestring, namestring));
527 else if((hudargs == "") && (durcnt ==""))
531 "^1NOTIFICATION HAS ARG COUNTS BUT NO ARGS OR HUDARGS OR DURCNT: "
532 "^7net_type = %s, net_name = %s, strnum = %d, flnum = %d"
544 notif.nent_args = strzone(
545 Process_Notif_Args(1, args, typestring, namestring));
549 // =======================================
550 // Process HUD and Centerprint Arguments
551 // Only processed on CSQC, as these
552 // args are only for HUD features.
553 // =======================================
557 notif.nent_hudargs = strzone(
558 Process_Notif_Args(2, hudargs, typestring, namestring));
560 if(icon != "") { notif.nent_icon = strzone(icon); }
565 "^1NOTIFICATION HAS HUDARGS BUT NO ICON: "
566 "^7net_type = %s, net_name = %s."
578 "^1NOTIFICATION HAS ICON BUT NO HUDARGS: "
579 "^7net_type = %s, net_name = %s.\n"
589 notif.nent_durcnt = strzone(Process_Notif_Args(3, durcnt, typestring, namestring));
591 if (cpid == CPID_Null && durcnt != "0 0")
595 "Notification has durcnt but no cpid: "
596 "net_type = %s, net_name = %s."
604 notif.nent_cpid = cpid;
608 // ======================
609 // Process Notif String
610 // ======================
611 #define SET_NOTIF_STRING(string,stringname) MACRO_BEGIN \
612 notif.nent_string = strzone(CCR( \
613 Process_Notif_Line( \
626 if(gentle != "") { SET_NOTIF_STRING(gentle, "GENTLE"); }
627 else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL"); }
629 else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL"); }
630 #undef SET_NOTIF_STRING
632 // Check to make sure a string was chosen
633 if(notif.nent_string == "")
637 "^1EMPTY NOTIFICATION: "
638 "^7net_type = %s, net_name = %s."
648 void Create_Notification_Entity_Multi(entity notif,
652 Notification anncename,
653 Notification infoname,
654 Notification centername)
656 MSG typeId = MSG_MULTI;
657 // Set MSG_MULTI string/float counts
658 if (!anncename && !infoname && !centername)
660 string typestring = Get_Notif_TypeName(typeId);
663 "^1NOTIFICATION WITH NO SUBCALLS: "
664 "^7net_type = %s, net_name = %s."
673 // announcements don't actually need any arguments, so lets not even count them.
674 if (anncename) { notif.nent_msgannce = anncename; }
676 float infoname_stringcount = 0, infoname_floatcount = 0;
677 float centername_stringcount = 0, centername_floatcount = 0;
681 notif.nent_msginfo = infoname;
682 infoname_stringcount = notif.nent_msginfo.nent_stringcount;
683 infoname_floatcount = notif.nent_msginfo.nent_floatcount;
688 notif.nent_msgcenter = centername;
689 centername_stringcount = notif.nent_msgcenter.nent_stringcount;
690 centername_floatcount = notif.nent_msgcenter.nent_floatcount;
693 // set the requirements of THIS notification to the totals of its subcalls
694 notif.nent_stringcount = max(infoname_stringcount, centername_stringcount);
695 notif.nent_floatcount = max(infoname_floatcount, centername_floatcount);
699 void Create_Notification_Entity_Choice(entity notif,
706 Notification optiona,
707 Notification optionb)
709 MSG typeId = MSG_CHOICE;
710 if (chtype == MSG_Null || !optiona || !optionb)
712 string typestring = Get_Notif_TypeName(typeId);
715 "^1NOTIFICATION IS MISSING CHOICE PARAMS: "
716 "^7net_type = %s, net_name = %s."
725 notif.nent_optiona = optiona;
726 notif.nent_optionb = optionb;
727 notif.nent_challow_def = challow_def; // 0: never allowed, 1: allowed in warmup, 2: always allowed
728 notif.nent_challow_var = challow_var; // 0: never allowed, 1: allowed in warmup, 2: always allowed
729 notif.nent_stringcount = max(notif.nent_optiona.nent_stringcount, notif.nent_optionb.nent_stringcount);
730 notif.nent_floatcount = max(notif.nent_optiona.nent_floatcount, notif.nent_optionb.nent_floatcount);
732 /*#ifdef NOTIFICATIONS_DEBUG
733 Debug_Notification(sprintf(
734 "Create_Notification_Entity(...): MSG_CHOICE: %s\n%s\n%s\n",
737 "^ optiona: %s %s : %d %d",
738 Get_Notif_TypeName(notif.nent_optiona.nent_type),
739 notif.nent_optiona.nent_name,
740 notif.nent_optiona.nent_stringcount,
741 notif.nent_optiona.nent_floatcount
744 "^ optionb: %s %s : %d %d",
745 Get_Notif_TypeName(notif.nent_optionb.nent_type),
746 notif.nent_optionb.nent_name,
747 notif.nent_optionb.nent_stringcount,
748 notif.nent_optionb.nent_floatcount
760 // used by MSG_CHOICE to build list of choices
762 void Notification_GetCvars(entity this)
764 FOREACH(Notifications, it.nent_type == MSG_CHOICE, {
765 GetCvars_handleFloat(
770 msg_choice_choices[it.nent_choice_idx],
771 sprintf("notification_%s", Get_Notif_CvarName(it))
777 /** used to output notifications.cfg file */
778 void Dump_Notifications(int fh, bool alsoprint)
780 #define NOTIF_WRITE(str) write_String_To_File(fh, str, alsoprint)
782 #define NOTIF_WRITE_ENTITY(e, description) \
783 NOTIF_WRITE(sprintf( \
784 "seta notification_%s \"%d\" \"%s\"\n", \
785 Get_Notif_CvarName(e), e.nent_default, description \
788 #define NOTIF_WRITE_ENTITY_CHOICE(e, descriptiona, descriptionb) \
789 NOTIF_WRITE(sprintf( \
790 "seta notification_%s \"%d\" \"%s\"\n" \
791 "seta notification_%s_ALLOWED \"%d\" \"%s\"\n", \
792 Get_Notif_CvarName(e), e.nent_default, descriptiona, \
793 Get_Notif_CvarName(e), e.nent_challow_def, descriptionb \
796 #define NOTIF_WRITE_HARDCODED(cvar, default, description) \
797 NOTIF_WRITE(sprintf( \
798 "seta notification_%s \"%s\" \"%s\"\n", \
799 cvar, default, description \
802 // Note: This warning only applies to the notifications.cfg file that is output...
803 // You ARE supposed to manually edit this function to add i.e. hard coded
804 // notification variables for mutators or game modes or such and then
805 // regenerate the notifications.cfg file from the new code.
807 NOTIF_WRITE("// ********************************************** //\n");
808 NOTIF_WRITE("// ** WARNING - DO NOT MANUALLY EDIT THIS FILE ** //\n");
809 NOTIF_WRITE("// ** ** //\n");
810 NOTIF_WRITE("// ** This file is automatically generated ** //\n");
811 NOTIF_WRITE("// ** by code with the command 'dumpnotifs'. ** //\n");
812 NOTIF_WRITE("// ** ** //\n");
813 NOTIF_WRITE("// ** If you add a new notification, please ** //\n");
814 NOTIF_WRITE("// ** regenerate this file with that command ** //\n");
815 NOTIF_WRITE("// ** making sure that the output matches ** //\n");
816 NOTIF_WRITE("// ** with the lists and defaults in code. ** //\n");
817 NOTIF_WRITE("// ** ** //\n");
818 NOTIF_WRITE("// ********************************************** //\n");
820 // These notifications will also append their string as a comment...
821 // This is not necessary, and does not matter if they vary between config versions,
822 // it is just a semi-helpful tool for those who want to manually change their user settings.
824 int NOTIF_ANNCE_COUNT = 0; FOREACH(Notifications, it.nent_type == MSG_ANNCE, { ++NOTIF_ANNCE_COUNT; });
825 NOTIF_WRITE(sprintf("\n// MSG_ANNCE notifications (count = %d):\n", NOTIF_ANNCE_COUNT));
826 FOREACH(Notifications, it.nent_type == MSG_ANNCE && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
827 NOTIF_WRITE_ENTITY(it,
828 "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
832 int NOTIF_INFO_COUNT = 0; FOREACH(Notifications, it.nent_type == MSG_INFO, { ++NOTIF_INFO_COUNT; });
833 NOTIF_WRITE(sprintf("\n// MSG_INFO notifications (count = %d):\n", NOTIF_INFO_COUNT));
834 FOREACH(Notifications, it.nent_type == MSG_INFO && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
835 NOTIF_WRITE_ENTITY(it,
836 "0 = off, 1 = print to console, "
837 "2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
841 int NOTIF_CENTER_COUNT = 0; FOREACH(Notifications, it.nent_type == MSG_CENTER, { ++NOTIF_CENTER_COUNT; });
842 NOTIF_WRITE(sprintf("\n// MSG_CENTER notifications (count = %d):\n", NOTIF_CENTER_COUNT));
843 FOREACH(Notifications, it.nent_type == MSG_CENTER && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
844 NOTIF_WRITE_ENTITY(it,
845 "0 = off, 1 = centerprint"
849 int NOTIF_MULTI_COUNT = 0; FOREACH(Notifications, it.nent_type == MSG_MULTI, { ++NOTIF_MULTI_COUNT; });
850 NOTIF_WRITE(sprintf("\n// MSG_MULTI notifications (count = %d):\n", NOTIF_MULTI_COUNT));
851 FOREACH(Notifications, it.nent_type == MSG_MULTI && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
852 NOTIF_WRITE_ENTITY(it,
853 "Enable this multiple notification"
857 int NOTIF_CHOICE_COUNT = 0; FOREACH(Notifications, it.nent_type == MSG_CHOICE, { ++NOTIF_CHOICE_COUNT; });
858 NOTIF_WRITE(sprintf("\n// MSG_CHOICE notifications (count = %d):\n", NOTIF_CHOICE_COUNT));
859 FOREACH(Notifications, it.nent_type == MSG_CHOICE && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
860 NOTIF_WRITE_ENTITY_CHOICE(it,
861 "Choice for this notification 0 = off, 1 = default message, 2 = verbose message",
862 "Allow choice for this notification 0 = off, 1 = only in warmup mode, 2 = always"
866 // edit these to match whichever cvars are used for specific notification options
867 NOTIF_WRITE("\n// HARD CODED notification variables:\n");
869 NOTIF_WRITE_HARDCODED(
870 "allow_chatboxprint", "1",
871 "Allow INFO notifications to be printed to chat box "
873 "1 = allow only if allowed by individual notification_INFO* cvars, "
874 "2 = force all INFO notifications to be printed to the chatbox"
877 NOTIF_WRITE_HARDCODED(
879 "Print extra debug information on all notification function calls "
880 "(Requires -DNOTIFICATIONS_DEBUG flag to be enabled on QCSRC compilation)... "
881 "0 = disabled, 1 = dprint, 2 = print"
884 NOTIF_WRITE_HARDCODED(
885 "errors_are_fatal", "1",
886 "If a notification fails upon initialization, cause a Host_Error to stop the program"
889 NOTIF_WRITE_HARDCODED(
890 "item_centerprinttime", "1.5",
891 "How long to show item information centerprint messages (like 'You got the Electro' or such)"
894 NOTIF_WRITE_HARDCODED(
895 "lifetime_mapload", "10",
896 "Amount of time that notification entities last immediately at mapload (in seconds) "
897 "to help prevent notifications from being lost on early init (like gamestart countdown)"
900 NOTIF_WRITE_HARDCODED(
901 "lifetime_runtime", "0.5",
902 "Amount of time that notification entities last on the server during runtime (In seconds)"
905 NOTIF_WRITE_HARDCODED(
906 "server_allows_location", "1",
907 "Server side cvar for allowing death messages to show location information too"
910 NOTIF_WRITE_HARDCODED(
911 "show_location", "0",
912 "Append location information to MSG_INFO death/kill messages"
915 NOTIF_WRITE_HARDCODED(
916 "show_location_string", "",
917 "Replacement string piped into sprintf, "
918 "so you can do different messages like this: ' at the %s' or ' (near %s)'"
921 NOTIF_WRITE_HARDCODED(
923 "Print information about sprees in death/kill messages"
926 NOTIF_WRITE_HARDCODED(
927 "show_sprees_center", "1",
928 "Show spree information in MSG_CENTER messages... "
929 "0 = off, 1 = target (but only for first victim) and attacker"
932 NOTIF_WRITE_HARDCODED(
933 "show_sprees_center_specialonly", "1",
934 "Don't show spree information in MSG_CENTER messages if it isn't an achievement"
937 NOTIF_WRITE_HARDCODED(
938 "show_sprees_info", "3",
939 "Show spree information in MSG_INFO messages... "
940 "0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker"
943 NOTIF_WRITE_HARDCODED(
944 "show_sprees_info_newline", "1",
945 "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
948 NOTIF_WRITE_HARDCODED(
949 "show_sprees_info_specialonly", "1",
950 "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
955 "\n// Notification counts (total = %d): "
956 "MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d\n"
971 #undef NOTIF_WRITE_HARDCODED
972 #undef NOTIF_WRITE_ENTITY
977 // ===============================
978 // Frontend Notification Pushing
979 // ===============================
981 string Local_Notification_sprintf(
982 string input, string args,
983 string s1, string s2, string s3, string s4,
984 int f1, float f2, float f3, float f4)
986 #ifdef NOTIFICATIONS_DEBUG
987 Debug_Notification(sprintf(
988 "Local_Notification_sprintf('%s^7', '%s', %s, %s);\n",
989 MakeConsoleSafe(input),
991 MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
992 sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
996 for (int sel_num = 0; sel_num < NOTIF_MAX_ARGS; ++sel_num) { arg_slot[sel_num] = ""; }
998 for (int sel_num = 0; (args != ""); )
1000 string selected = car(args); args = cdr(args);
1001 NOTIF_HIT_MAX(NOTIF_MAX_ARGS, "Local_Notification_sprintf");
1002 string tmp_s; // used by NOTIF_ARGUMENT_LIST
1003 switch (strtolower(selected))
1005 #define ARG_CASE_ARG_CS_SV_HA(selected, result) case selected: arg_slot[sel_num++] = result; break;
1006 #define ARG_CASE_ARG_CS_SV_DC(selected, result) case selected: arg_slot[sel_num++] = result; break;
1007 #define ARG_CASE_ARG_CS_SV(selected, result) case selected: arg_slot[sel_num++] = result; break;
1009 #define ARG_CASE_ARG_CS(selected, result) case selected: arg_slot[sel_num++] = result; break;
1010 #define ARG_CASE_ARG_SV(selected, result)
1012 #define ARG_CASE_ARG_CS(selected, result)
1013 #define ARG_CASE_ARG_SV(selected, result) case selected: arg_slot[sel_num++] = result; break;
1015 #define ARG_CASE_ARG_DC(selected, result)
1016 #define ARG_CASE(prog, selected, result) ARG_CASE_##prog(selected, result)
1019 #undef ARG_CASE_ARG_DC
1020 #undef ARG_CASE_ARG_SV
1021 #undef ARG_CASE_ARG_CS
1022 #undef ARG_CASE_ARG_CS_SV
1023 #undef ARG_CASE_ARG_CS_SV_DC
1024 #undef ARG_CASE_ARG_CS_SV_HA
1025 default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_ARGS, "Local_Notification_sprintf")
1029 strcat(input, "\n"),
1041 void Local_Notification_sound(int soundchannel, string soundfile, float soundvolume, float soundposition)
1043 if ((soundfile != prev_soundfile) || (time >= (prev_soundtime + autocvar_cl_announcer_antispam)))
1045 #ifdef NOTIFICATIONS_DEBUG
1046 Debug_Notification(sprintf(
1047 "Local_Notification_sound(%f, '%s', %f, %f);\n",
1049 AnnouncerFilename(soundfile),
1055 _sound(NULL, soundchannel, AnnouncerFilename(soundfile), soundvolume, soundposition);
1057 strcpy(prev_soundfile, soundfile);
1058 prev_soundtime = time;
1062 #ifdef NOTIFICATIONS_DEBUG
1063 Debug_Notification(sprintf(
1065 "Local_Notification_sound(%f, '%s', %f, %f) "
1066 "^1BLOCKED BY ANTISPAM:^7 prevsnd: '%s', timediff: %f, limit: %f\n"
1069 AnnouncerFilename(soundfile),
1073 (time - prev_soundtime),
1074 autocvar_cl_announcer_antispam
1080 void Local_Notification_HUD_Notify_Push(
1081 string icon, string hudargs,
1082 string s1, string s2, string s3, string s4,
1083 float f1, float f2, float f3, float f4)
1085 arg_slot[0] = ""; arg_slot[1] = "";
1087 for (int sel_num = 0; (hudargs != ""); )
1089 string selected = car(hudargs); hudargs = cdr(hudargs);
1090 NOTIF_HIT_MAX(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push");
1091 switch (strtolower(selected))
1093 #define ARG_CASE_ARG_CS_SV_HA(selected, result) case selected: arg_slot[sel_num++] = result; break;
1094 #define ARG_CASE_ARG_CS_SV_DC(selected, result)
1095 #define ARG_CASE_ARG_CS_SV(selected, result)
1096 #define ARG_CASE_ARG_CS(selected, result)
1097 #define ARG_CASE_ARG_SV(selected, result)
1098 #define ARG_CASE_ARG_DC(selected, result)
1099 #define ARG_CASE(prog, selected, result) ARG_CASE_##prog(selected, result)
1102 #undef ARG_CASE_ARG_DC
1103 #undef ARG_CASE_ARG_SV
1104 #undef ARG_CASE_ARG_CS
1105 #undef ARG_CASE_ARG_CS_SV
1106 #undef ARG_CASE_ARG_CS_SV_DC
1107 #undef ARG_CASE_ARG_CS_SV_HA
1108 default: NOTIF_HIT_UNKNOWN(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push")
1111 #ifdef NOTIFICATIONS_DEBUG
1112 Debug_Notification(sprintf(
1113 "Local_Notification_HUD_Notify_Push('%s^7', '%s', %s, %s, %s);\n",
1116 MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
1117 sprintf("%d, %d, %d, %d", f1, f2, f3, f4),
1118 MakeConsoleSafe(sprintf("'%s^7', '%s^7'", stof(arg_slot[0]), stof(arg_slot[1])))
1121 HUD_Notify_Push(icon, arg_slot[0], arg_slot[1]);
1124 void Local_Notification_centerprint_generic(
1125 string input, string durcnt,
1126 CPID cpid, float f1, float f2)
1128 arg_slot[0] = ""; arg_slot[1] = "";
1130 for (int sel_num = 0; (durcnt != ""); )
1132 string selected = car(durcnt); durcnt = cdr(durcnt);
1133 NOTIF_HIT_MAX(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic");
1134 switch (strtolower(selected))
1136 #define ARG_CASE_ARG_CS_SV_HA(selected, result)
1137 #define ARG_CASE_ARG_CS_SV_DC(selected, result) case selected: arg_slot[sel_num++] = result; break;
1138 #define ARG_CASE_ARG_CS_SV(selected, result)
1139 #define ARG_CASE_ARG_CS(selected, result)
1140 #define ARG_CASE_ARG_SV(selected, result)
1141 #define ARG_CASE_ARG_DC(selected, result) case selected: arg_slot[sel_num++] = result; break;
1142 #define ARG_CASE(prog, selected, result) ARG_CASE_##prog(selected,result)
1145 #undef ARG_CASE_ARG_DC
1146 #undef ARG_CASE_ARG_SV
1147 #undef ARG_CASE_ARG_CS
1148 #undef ARG_CASE_ARG_CS_SV
1149 #undef ARG_CASE_ARG_CS_SV_DC
1150 #undef ARG_CASE_ARG_CS_SV_HA
1153 if (/* wtf */ ftos(stof(selected)) != "") { arg_slot[sel_num++] = selected; }
1154 else { NOTIF_HIT_UNKNOWN(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic") }
1159 #ifdef NOTIFICATIONS_DEBUG
1160 Debug_Notification(sprintf(
1161 "Local_Notification_centerprint_generic('%s^7', '%s', %d, %d, %d, %d);\n",
1162 MakeConsoleSafe(input),
1169 centerprint_generic(ORDINAL(cpid), input, stof(arg_slot[0]), stof(arg_slot[1]));
1173 void Local_Notification(MSG net_type, Notification net_name, ...count)
1175 // retreive entity of this notification
1176 entity notif = net_name;
1179 #ifdef NOTIFICATIONS_DEBUG
1180 Debug_Notification(sprintf(
1181 "Local_Notification(%s, NULL, ...);\n",
1182 Get_Notif_TypeName(net_type)
1185 LOG_WARNF("Incorrect usage of Local_Notification: %s", "Null notification");
1189 // check if the notification is enabled
1190 if (!notif.nent_enabled)
1192 #ifdef NOTIFICATIONS_DEBUG
1193 Debug_Notification(sprintf(
1194 "Local_Notification(%s, %s, ...): Entity was disabled...\n",
1195 Get_Notif_TypeName(net_type),
1202 string s1 = CCR((notif.nent_stringcount > 0) ? ...(0, string) : "");
1203 string s2 = CCR((notif.nent_stringcount > 1) ? ...(1, string) : "");
1204 string s3 = CCR((notif.nent_stringcount > 2) ? ...(2, string) : "");
1205 string s4 = CCR((notif.nent_stringcount > 3) ? ...(3, string) : "");
1206 float f1 = ((notif.nent_floatcount > 0) ? ...((notif.nent_stringcount + 0), float) : 0);
1207 float f2 = ((notif.nent_floatcount > 1) ? ...((notif.nent_stringcount + 1), float) : 0);
1208 float f3 = ((notif.nent_floatcount > 2) ? ...((notif.nent_stringcount + 2), float) : 0);
1209 float f4 = ((notif.nent_floatcount > 3) ? ...((notif.nent_stringcount + 3), float) : 0);
1211 #ifdef NOTIFICATIONS_DEBUG
1212 Debug_Notification(sprintf(
1213 "Local_Notification(%s, %s, %s, %s);\n",
1214 Get_Notif_TypeName(net_type),
1216 MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
1217 sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
1221 if ((notif.nent_stringcount + notif.nent_floatcount) != count)
1225 "Arguments mismatch for Local_Notification(%s, %s, ...)! "
1226 "stringcount(%d) + floatcount(%d) != count(%d)\n"
1227 "Check the definition and function call for accuracy...?\n"
1229 Get_Notif_TypeName(net_type),
1231 notif.nent_stringcount,
1232 notif.nent_floatcount,
1243 Local_Notification_sound(notif.nent_channel, notif.nent_snd, notif.nent_vol, notif.nent_position);
1245 backtrace("MSG_ANNCE on server?... Please notify Samual immediately!\n");
1253 Local_Notification_sprintf(
1260 if (notif.nent_icon != "")
1262 if (notif.nent_iconargs != "")
1264 string s = Local_Notification_sprintf(
1265 notif.nent_icon,notif.nent_iconargs,
1266 s1, s2, s3, s4, f1, f2, f3, f4);
1267 // remove the trailing newline
1268 notif.nent_icon = strzone(substring(s, 0, -1));
1270 Local_Notification_HUD_Notify_Push(
1283 Local_Notification_centerprint_generic(
1284 Local_Notification_sprintf(
1298 if (notif.nent_msginfo && notif.nent_msginfo.nent_enabled)
1300 Local_Notification_WOVA(
1303 notif.nent_msginfo.nent_stringcount,
1304 notif.nent_msginfo.nent_floatcount,
1309 if (notif.nent_msgannce && notif.nent_msgannce.nent_enabled)
1311 Local_Notification_WOVA(
1313 notif.nent_msgannce,
1318 if (notif.nent_msgcenter && notif.nent_msgcenter.nent_enabled)
1320 Local_Notification_WOVA(
1322 notif.nent_msgcenter,
1323 notif.nent_msgcenter.nent_stringcount,
1324 notif.nent_msgcenter.nent_floatcount,
1334 entity found_choice = notif.nent_optiona;
1335 if (notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) {
1336 switch (cvar(sprintf("notification_%s", Get_Notif_CvarName(notif))))
1339 case 2: found_choice = notif.nent_optionb; break;
1340 default: return; // not enabled anyway
1344 Local_Notification_WOVA(
1345 found_choice.nent_type,
1347 found_choice.nent_stringcount,
1348 found_choice.nent_floatcount,
1355 // WOVA = Without Variable Arguments
1356 void Local_Notification_WOVA(
1357 MSG net_type, Notification net_name,
1358 float stringcount, float floatcount,
1359 string s1, string s2, string s3, string s4,
1360 float f1, float f2, float f3, float f4)
1362 #define VARITEM(stringc, floatc, args) \
1363 if ((stringcount == stringc) && (floatcount == floatc)) \
1364 { Local_Notification(net_type, net_name, args); return; }
1365 EIGHT_VARS_TO_VARARGS_VARLIST
1367 Local_Notification(net_type, net_name); // some notifications don't have any arguments at all
1371 // =========================
1372 // Notification Networking
1373 // =========================
1375 /** networked as a linked entity to give newly connecting clients some notification context */
1376 REGISTER_NET_LINKED(ENT_CLIENT_NOTIFICATION)
1379 NET_HANDLE(ENT_CLIENT_NOTIFICATION, bool is_new)
1382 MSG net_type = ENUMCAST(MSG, ReadByte());
1383 int net_name = ReadShort();
1386 if (net_type == MSG_CENTER_KILL)
1388 if (!is_new) return;
1390 #ifdef NOTIFICATIONS_DEBUG
1391 Debug_Notification(sprintf(
1392 "Read_Notification(%d) at %f: net_type = %s, cpid = %d\n",
1395 Get_Notif_TypeName(net_type),
1399 int _net_name = net_name;
1400 CPID net_name = ENUMCAST(CPID, _net_name);
1401 if (net_name == CPID_Null) {
1403 reset_centerprint_messages();
1406 centerprint_generic(ORDINAL(net_name), "", 0, 0);
1411 Notification notif = Get_Notif_Ent(net_type, net_name);
1413 #ifdef NOTIFICATIONS_DEBUG
1414 Debug_Notification(sprintf(
1415 "Read_Notification(%d) at %f: net_type = %s, net_name = %s (%d)\n",
1418 Get_Notif_TypeName(net_type),
1419 notif.registered_id,
1425 backtrace("Read_Notification: Could not find notification entity!\n");
1429 string s1 = ((notif.nent_stringcount > 0) ? ReadString() : "");
1430 string s2 = ((notif.nent_stringcount > 1) ? ReadString() : "");
1431 string s3 = ((notif.nent_stringcount > 2) ? ReadString() : "");
1432 string s4 = ((notif.nent_stringcount > 3) ? ReadString() : "");
1433 float f1 = ((notif.nent_floatcount > 0) ? ReadLong() : 0);
1434 float f2 = ((notif.nent_floatcount > 1) ? ReadLong() : 0);
1435 float f3 = ((notif.nent_floatcount > 2) ? ReadLong() : 0);
1436 float f4 = ((notif.nent_floatcount > 3) ? ReadLong() : 0);
1438 if (!is_new) return;
1439 Local_Notification_WOVA(
1441 notif.nent_stringcount,
1442 notif.nent_floatcount,
1449 void Net_Notification_Remove(entity this)
1451 #ifdef NOTIFICATIONS_DEBUG
1452 Debug_Notification(sprintf(
1453 "Net_Notification_Remove() at %f: %s '%s - %s' notification\n",
1455 ((this.nent_net_name == -1) ? "Killed" : "Removed"),
1456 Get_Notif_TypeName(this.nent_net_type),
1457 this.owner.nent_name
1460 for (int i = 0; i < this.nent_stringcount; ++i) { strfree(this.nent_strings[i]); }
1464 bool Net_Write_Notification(entity this, entity client, int sf)
1466 if (!Notification_ShouldSend(this.nent_broadcast, client, this.nent_client)) return false;
1467 WriteHeader(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
1468 WriteByte(MSG_ENTITY, ORDINAL(this.nent_net_type));
1469 WriteShort(MSG_ENTITY, this.nent_net_name);
1470 for (int i = 0; i < this.nent_stringcount; ++i) { WriteString(MSG_ENTITY, this.nent_strings[i]); }
1471 for (int i = 0; i < this.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, this.nent_floats[i]); }
1475 void Kill_Notification(
1476 NOTIF broadcast, entity client,
1477 /** message group, MSG_Null for all */
1479 /** cpid group, CPID_Null for all */
1482 #ifdef NOTIFICATIONS_DEBUG
1483 Debug_Notification(sprintf(
1484 "Kill_Notification(%s, '%s', %s, %d);\n",
1485 Get_Notif_BroadcastName(broadcast),
1487 (net_type ? Get_Notif_TypeName(net_type) : "0"),
1492 string checkargs = Notification_CheckArgs(broadcast, client);
1493 if (checkargs != "") { LOG_WARNF("Incorrect usage of Kill_Notification: %s", checkargs); return; }
1495 entity net_notif = new_pure(net_kill_notification);
1496 net_notif.nent_broadcast = broadcast;
1497 net_notif.nent_client = client;
1498 net_notif.nent_net_type = MSG_CENTER_KILL;
1499 net_notif.nent_net_name = ORDINAL(net_cpid);
1500 Net_LinkEntity(net_notif, false, autocvar_notification_lifetime_runtime, Net_Write_Notification);
1502 IL_EACH(g_notifications,
1503 (it.owner.nent_type == net_type || net_type == MSG_Null) && (it.owner.nent_cpid == net_cpid || net_cpid == CPID_Null),
1505 it.nent_net_name = -1;
1506 it.nextthink = time;
1511 void Send_Notification(
1512 NOTIF broadcast, entity client,
1513 MSG net_type, Notification net_name,
1516 if (broadcast != NOTIF_ALL && broadcast != NOTIF_ALL_EXCEPT && !IS_REAL_CLIENT(client)) return;
1517 entity notif = net_name;
1518 string parms = sprintf("%s, '%s', %s, %s",
1519 Get_Notif_BroadcastName(broadcast),
1521 Get_Notif_TypeName(net_type),
1522 net_name.registered_id
1524 #ifdef NOTIFICATIONS_DEBUG
1525 Debug_Notification(sprintf("Send_Notification(%s, ...%d);\n", parms, count));
1530 LOG_WARN("Send_Notification: Could not find notification entity!");
1534 // check supplied broadcast, target, type, and name for errors
1535 string checkargs = Notification_CheckArgs(broadcast, client);
1536 if (!net_name) { checkargs = sprintf("No notification provided! %s", checkargs); }
1537 if (checkargs != "")
1539 LOG_WARNF("Incorrect usage of Send_Notification: %s", checkargs);
1543 string s1 = ((0 < notif.nent_stringcount) ? ...(0, string) : "");
1544 string s2 = ((1 < notif.nent_stringcount) ? ...(1, string) : "");
1545 string s3 = ((2 < notif.nent_stringcount) ? ...(2, string) : "");
1546 string s4 = ((3 < notif.nent_stringcount) ? ...(3, string) : "");
1547 float f1 = ((0 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 0), float) : 0);
1548 float f2 = ((1 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 1), float) : 0);
1549 float f3 = ((2 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 2), float) : 0);
1550 float f4 = ((3 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 3), float) : 0);
1552 #ifdef NOTIFICATIONS_DEBUG
1553 Debug_Notification(sprintf(
1554 "Send_Notification(%s, %s, %s);\n",
1556 MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
1557 sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
1561 if ((notif.nent_stringcount + notif.nent_floatcount) != count)
1564 "Argument mismatch for Send_Notification(%s, ...)! "
1565 "stringcount(%d) + floatcount(%d) != count(%d)\n"
1566 "Check the definition and function call for accuracy...?\n",
1568 notif.nent_stringcount,
1569 notif.nent_floatcount,
1575 if (server_is_dedicated
1576 && (broadcast == NOTIF_ALL || broadcast == NOTIF_ALL_EXCEPT)
1577 && !(net_type == MSG_ANNCE || net_type == MSG_CENTER)
1580 Local_Notification_WOVA(
1582 notif.nent_stringcount,
1583 notif.nent_floatcount,
1588 if (net_type == MSG_CHOICE)
1590 // THIS GETS TRICKY... now we have to cycle through each possible player (checking broadcast)
1591 // and then do an individual NOTIF_ONE_ONLY recursive call for each one depending on their option...
1592 // It's slow, but it's better than the alternatives:
1593 // 1. Constantly networking all info and letting client decide
1594 // 2. Manually handling each separate call on per-usage basis (See old CTF usage of verbose)
1595 entity found_choice;
1597 #define RECURSE_FROM_CHOICE(ent,action) MACRO_BEGIN \
1598 if (notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) { \
1599 switch (CS(ent).msg_choice_choices[net_name.nent_choice_idx]) \
1601 case 1: found_choice = notif.nent_optiona; break; \
1602 case 2: found_choice = notif.nent_optionb; break; \
1606 found_choice = notif.nent_optiona; \
1608 Send_Notification_WOVA( \
1611 found_choice.nent_type, \
1613 found_choice.nent_stringcount, \
1614 found_choice.nent_floatcount, \
1621 case NOTIF_ONE_ONLY: // we can potentially save processing power with this broadcast method
1623 if (IS_REAL_CLIENT(client)) {
1624 RECURSE_FROM_CHOICE(client, return);
1630 FOREACH_CLIENT(IS_REAL_CLIENT(it) && Notification_ShouldSend(broadcast, it, client), {
1631 RECURSE_FROM_CHOICE(it, continue);
1639 entity net_notif = new_pure(net_notification);
1640 IL_PUSH(g_notifications, net_notif);
1641 net_notif.owner = notif;
1642 net_notif.nent_broadcast = broadcast;
1643 net_notif.nent_client = client;
1644 net_notif.nent_net_type = net_type;
1645 net_notif.nent_net_name = notif.m_id;
1646 net_notif.nent_stringcount = notif.nent_stringcount;
1647 net_notif.nent_floatcount = notif.nent_floatcount;
1649 for (int i = 0; i < net_notif.nent_stringcount; ++i) {
1650 net_notif.nent_strings[i] = strzone(...(i, string));
1652 for (int i = 0; i < net_notif.nent_floatcount; ++i) {
1653 net_notif.nent_floats[i] = ...((net_notif.nent_stringcount + i), float);
1656 setthink(net_notif, Net_Notification_Remove);
1657 net_notif.nextthink = (time > autocvar_notification_lifetime_mapload)
1658 ? (time + autocvar_notification_lifetime_runtime)
1659 : autocvar_notification_lifetime_mapload;
1661 Net_LinkEntity(net_notif, false, 0, Net_Write_Notification);
1665 // WOVA = Without Variable Arguments
1666 void Send_Notification_WOVA(
1667 NOTIF broadcast, entity client,
1668 MSG net_type, Notification net_name,
1669 float stringcount, float floatcount,
1670 string s1, string s2, string s3, string s4,
1671 float f1, float f2, float f3, float f4)
1673 #ifdef NOTIFICATIONS_DEBUG
1674 entity notif = net_name;
1675 Debug_Notification(sprintf(
1676 "Send_Notification_WOVA(%s, %d, %d, %s, %s);\n",
1679 Get_Notif_BroadcastName(broadcast),
1681 Get_Notif_TypeName(net_type),
1686 MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
1687 sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
1691 #define VARITEM(stringc, floatc, args) \
1692 if ((stringcount == stringc) && (floatcount == floatc)) \
1693 { Send_Notification(broadcast, client, net_type, net_name, args); return; }
1694 EIGHT_VARS_TO_VARARGS_VARLIST
1696 Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
1699 // WOCOVA = Without Counts Or Variable Arguments
1700 void Send_Notification_WOCOVA(
1701 NOTIF broadcast, entity client,
1702 MSG net_type, Notification net_name,
1703 string s1, string s2, string s3, string s4,
1704 float f1, float f2, float f3, float f4)
1706 entity notif = net_name;
1708 #ifdef NOTIFICATIONS_DEBUG
1709 Debug_Notification(sprintf(
1710 "Send_Notification_WOCOVA(%s, %s, %s);\n",
1713 Get_Notif_BroadcastName(broadcast),
1715 Get_Notif_TypeName(net_type),
1718 MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
1719 sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
1723 #define VARITEM(stringc, floatc, args) \
1724 if ((notif.nent_stringcount == stringc) && (notif.nent_floatcount == floatc)) \
1725 { Send_Notification(broadcast, client, net_type, net_name, args); return; }
1726 EIGHT_VARS_TO_VARARGS_VARLIST
1728 Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
1730 #endif // ifdef SVQC