// main types/groups of notifications
#define MSG_ANNCE 1 // "Global" AND "personal" announcer messages
-#define MSG_INFO 2 // "Global" information messages
+#define MSG_INFO 2 // "Global" information messages
#define MSG_CENTER 3 // "Personal" centerprint messages
#define MSG_CENTER_CPID 4 // Kill centerprint message
#define MSG_MULTI 5 // Subcall MSG_INFO and/or MSG_CENTER notifications
#define MSG_CHOICE 6 // Choose which subcall wrapper to activate
-#define NO_MSG -12345
+// negative confirmations
+#define NO_MSG -12345 // allows various things to know when no information is added
+#define NOTIF_ABORT -1234 // allows Send_Notification to safely abort sending
#define EIGHT_VARS_TO_VARARGS_VARLIST \
VARITEM(1, 0, s1) \
float typeid,
float nameid,
string namestring,
- float anncename,
- float infoname,
- float centername,
+ float strnum,
+ float flnum,
+ /* MSG_ANNCE */
float channel,
string snd,
float vol,
float position,
- float strnum,
- float flnum,
+ /* MSG_INFO & MSG_CENTER */
string args,
string hudargs,
string icon,
string durcnt,
string normal,
string gentle,
+ /* MSG_MULTI */
+ float anncename,
+ float infoname,
+ float centername,
+ /* MSG_CHOICE */
+ float challow_def,
+ float challow_var,
float chtype,
float optiona,
float optionb);
#define NOTIF_ALL 5
#define NOTIF_ALL_EXCEPT 6
-#define IFSTR(num) ((num < notif.nent_stringcount) ? ...(num, string) : "")
-#define IFFL(num) ((((notif.nent_stringcount-1) + num) < count) ? ...(((notif.nent_stringcount-1) + num), float) : 0)
-
void Kill_Notification(
float broadcast, entity client,
float net_type, float net_name);
float net_type, float net_name,
...count);
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);
+void Send_Notification_WOCOVA(
float broadcast, entity client,
float net_type, float net_name,
string s1, string s2, string s3, string s4,
/*
List of all notifications (including identifiers and display information)
Possible Tokens:
- default, name, channel, sound, volume, position,
- anncename, infoname, centername, strnum, flnum, args,
- hudargs, icon, cpid, durcnt, normal, gentle
+ default, name, strnum, flnum,
+ channel, sound, volume, position,
+ args, hudargs, icon, cpid, durcnt, normal, gentle,
+ anncename, infoname, centername,
+ challow, chtype, optiona, optionb
Format Specifications:
MSG_ANNCE:
default: FLOAT: Default setting for whether the notification is enabled or not
anncename: VAR: Name of announcer notification for reference
infoname: VAR: Name of info notification for reference
centername: VAR: Name of centerprint notification for reference
+ MSG_CHOICE:
+ default: FLOAT: Default setting for whether the notification is enabled or not
+ ^-> 0 = disabled, 1 = select option A, 2 = selection option B
+ challow: FLOAT: Default setting for server allowing choices other than A
+ ^-> 0 = no choice, 1 = allowed in warmup, 2 = always allowed
+ name: VAR: Name of choice notification
+ chtype: VAR: Notification message type for options
+ optiona: VAR: Name of choice "A" notification for reference
+ optionb: VAR: Name of choice "B" notification for reference
Messages with ^F1, ^BG, ^TC, etc etc in them will replace those strings
with colors according to the cvars the user has chosen. This allows for
Check out the definitions in util.qc/util.qh/teams.qh for string CCR(...) and
string TCR(...) to better understand how these code replacements work.
-
+
Additionally, you can find all the definitions and explanations for
the argument values and what they return down below in this file.
-ALWAYS reset a color after a name (this way they don't set it for the whole string).
-NEVER re-declare an event twice.
-NEVER add or remove tokens from the format, it SHOULD already work.
- -MSG_INFO messages must ALWAYS end with a new line: \n
-MSG_INFO hudargs must always be ATTACKER -> VICTIM
- -MSG_CENTER should NOT end with a new line
+ -MSG_INFO and MSG_CENTER should NOT end with a new line
General rules:
-Be clean and simple with your notification naming,
If you send a notification with mismatching arguments, Send_Notification() will error.
*/
-#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
+#define MULTITEAM_ANNCE2(default,prefix,channel,sound,volume,position) \
+ MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+ MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position)
+#define MULTITEAM_ANNCE3(default,prefix,channel,sound,volume,position) \
MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
- #if teams >= 3 \
- MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
- #endif \
- #if teams >= 4 \
- MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position) \
- #endif
-#define MSG_ANNCE_NOTIFICATIONS \
- MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT, CH_INFO, "airshot", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AMAZING, CH_INFO, "amazing", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AWESOME, CH_INFO, "awesome", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_BOTLIKE, CH_INFO, "botlike", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_ACHIEVEMENT_ELECTROBITCH, CH_INFO, "electrobitch", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_IMPRESSIVE, CH_INFO, "impressive", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_YODA, CH_INFO, "yoda", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_BEGIN, CH_INFO, "begin", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_03, CH_INFO, "03kills", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_05, CH_INFO, "05kills", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_10, CH_INFO, "10kills", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_15, CH_INFO, "15kills", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_20, CH_INFO, "20kills", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_25, CH_INFO, "25kills", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_30, CH_INFO, "30kills", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_MINSTAGIB_LASTSECOND, CH_INFO, "lastsecond", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_MINSTAGIB_NARROWLY, CH_INFO, "narrowly", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_MINSTAGIB_TERMINATED, CH_INFO, "terminated", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(0, ANNCE_MULTIFRAG, CH_INFO, "multifrag", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_1, CH_INFO, "1", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_2, CH_INFO, "2", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_3, CH_INFO, "3", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_4, CH_INFO, "4", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_5, CH_INFO, "5", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_6, CH_INFO, "6", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_7, CH_INFO, "7", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_8, CH_INFO, "8", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_9, CH_INFO, "9", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_NUM_10, CH_INFO, "10", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_PREPARE, CH_INFO, "prepareforbattle", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_1, CH_INFO, "1fragleft", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_2, CH_INFO, "2fragsleft", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_3, CH_INFO, "3fragsleft", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_1, CH_INFO, "1minuteremains", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_5, CH_INFO, "5minutesremain", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_TIMEOUT, CH_INFO, "timeoutcalled", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_VOTE_ACCEPT, CH_INFO, "voteaccept", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_VOTE_CALL, CH_INFO, "votecall", VOL_BASEVOICE, ATTN_NONE) \
- MSG_ANNCE_NOTIF(2, ANNCE_VOTE_FAIL, CH_INFO, "votefail", VOL_BASEVOICE, ATTN_NONE)
+ MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position)
+#define MULTITEAM_ANNCE4(default,prefix,channel,sound,volume,position) \
+ MSG_ANNCE_NOTIF(default, prefix##RED, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), volume, position) \
+ MSG_ANNCE_NOTIF(default, prefix##BLUE, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), volume, position) \
+ MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
+ MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position)
+#define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
+ MULTITEAM_ANNCE##teams(default,prefix,channel,sound,volume,position)
-#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+#define MSG_ANNCE_NOTIFICATIONS \
+ MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT, CH_INFO, "airshot", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AMAZING, CH_INFO, "amazing", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AWESOME, CH_INFO, "awesome", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_BOTLIKE, CH_INFO, "botlike", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_ACHIEVEMENT_ELECTROBITCH, CH_INFO, "electrobitch", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_IMPRESSIVE, CH_INFO, "impressive", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_YODA, CH_INFO, "yoda", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_BEGIN, CH_INFO, "begin", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_03, CH_INFO, "03kills", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_05, CH_INFO, "05kills", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_10, CH_INFO, "10kills", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_15, CH_INFO, "15kills", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_20, CH_INFO, "20kills", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_25, CH_INFO, "25kills", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_KILLSTREAK_30, CH_INFO, "30kills", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_MINSTAGIB_LASTSECOND, CH_INFO, "lastsecond", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_MINSTAGIB_NARROWLY, CH_INFO, "narrowly", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_MINSTAGIB_TERMINATED, CH_INFO, "terminated", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_MULTIFRAG, CH_INFO, "multifrag", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_1, CH_INFO, "1", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_2, CH_INFO, "2", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_3, CH_INFO, "3", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_4, CH_INFO, "4", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_5, CH_INFO, "5", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_6, CH_INFO, "6", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_7, CH_INFO, "7", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_8, CH_INFO, "8", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_9, CH_INFO, "9", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_10, CH_INFO, "10", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_1, CH_INFO, "1", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_2, CH_INFO, "2", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_3, CH_INFO, "3", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_4, CH_INFO, "4", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_GAMESTART_5, CH_INFO, "5", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_6, CH_INFO, "6", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_7, CH_INFO, "7", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_8, CH_INFO, "8", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_9, CH_INFO, "9", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_GAMESTART_10, CH_INFO, "10", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_1, CH_INFO, "1", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_2, CH_INFO, "2", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_3, CH_INFO, "3", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_4, CH_INFO, "4", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_5, CH_INFO, "5", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_6, CH_INFO, "6", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_7, CH_INFO, "7", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_8, CH_INFO, "8", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_9, CH_INFO, "9", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_IDLE_10, CH_INFO, "10", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_1, CH_INFO, "1", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_2, CH_INFO, "2", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_3, CH_INFO, "3", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_4, CH_INFO, "4", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_5, CH_INFO, "5", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_6, CH_INFO, "6", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_7, CH_INFO, "7", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_8, CH_INFO, "8", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_9, CH_INFO, "9", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_KILL_10, CH_INFO, "10", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_1, CH_INFO, "1", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_2, CH_INFO, "2", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_3, CH_INFO, "3", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_4, CH_INFO, "4", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_5, CH_INFO, "5", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_6, CH_INFO, "6", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_7, CH_INFO, "7", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_8, CH_INFO, "8", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_9, CH_INFO, "9", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_RESPAWN_10, CH_INFO, "10", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_1, CH_INFO, "1", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_2, CH_INFO, "2", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_NUM_ROUNDSTART_3, CH_INFO, "3", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_4, CH_INFO, "4", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_5, CH_INFO, "5", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_6, CH_INFO, "6", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_7, CH_INFO, "7", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_8, CH_INFO, "8", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_9, CH_INFO, "9", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(0, ANNCE_NUM_ROUNDSTART_10, CH_INFO, "10", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_PREPARE, CH_INFO, "prepareforbattle", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_1, CH_INFO, "1fragleft", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_2, CH_INFO, "2fragsleft", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(1, ANNCE_REMAINING_FRAG_3, CH_INFO, "3fragsleft", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_1, CH_INFO, "1minuteremains", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_REMAINING_MIN_5, CH_INFO, "5minutesremain", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_TIMEOUT, CH_INFO, "timeoutcalled", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_VOTE_ACCEPT, CH_INFO, "voteaccept", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_VOTE_CALL, CH_INFO, "votecall", VOL_BASEVOICE, ATTEN_NONE) \
+ MSG_ANNCE_NOTIF(2, ANNCE_VOTE_FAIL, CH_INFO, "votefail", VOL_BASEVOICE, ATTEN_NONE)
+
+#define MULTITEAM_INFO2(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+ MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+ MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_INFO3(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
- #if teams >= 3 \
- MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
- #endif \
- #if teams >= 4 \
- MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
- #endif
+ MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_INFO4(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle) \
+ MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+ MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+ MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+ MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STATIC_NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \
+ MULTITEAM_INFO##teams(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle)
+
#define MSG_INFO_NOTIFICATIONS \
MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 2, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag"), "") \
MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 2, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_LASER_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponlaser", _("^BG%s^K1 shot themself to hell with their Laser%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponminelayer", _("^BG%s%s^K1 got too close to ^BG%s^K1's mine%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MINELAYER_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponminelayer", _("^BG%s^K1 forgot about their mine%s%s"), "") \
- MSG_INFO_NOTIF(1, INFO_WEAPON_MINSTANEX_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponminstanex", _("^BG%s%s^K1 has been vaporized by ^BG%s^K1's Minstanex%s%s"), "") \
+ MSG_INFO_NOTIF(1, INFO_WEAPON_VAPORIZER_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponminstanex", _("^BG%s%s^K1 has been sublimated by ^BG%s^K1's Vaporizer%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_BOUNCE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weapongrenadelauncher", _("^BG%s%s^K1 got too close to ^BG%s^K1's Mortar grenade%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_MURDER_EXPLODE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weapongrenadelauncher", _("^BG%s%s^K1 ate ^BG%s^K1's Mortar grenade%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_MORTAR_SUICIDE_BOUNCE, 2, 1, "s1 s2loc spree_lost", "s1", "weapongrenadelauncher", _("^BG%s^K1 didn't see their own Mortar grenade%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_SEEKER_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weaponseeker", _("^BG%s^K1 played with tiny Seeker rockets%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponshotgun", _("^BG%s%s^K1 was gunned down by ^BG%s^K1's Shotgun%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_SHOTGUN_MURDER_SLAP, 3, 2, "spree_inf s2 s1 s3loc spree_end", "s2 s1", "notify_melee_shotgun", _("^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shotgun%s%s"), "") \
+ MSG_INFO_NOTIF(1, INFO_WEAPON_SHOCKWAVE_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponshotgun", _("^BG%s%s^K1 was gunned down by ^BG%s^K1's Shockwave%s%s"), "") \
+ MSG_INFO_NOTIF(1, INFO_WEAPON_SHOCKWAVE_MURDER_SLAP, 3, 2, "spree_inf s2 s1 s3loc spree_end", "s2 s1", "notify_melee_shotgun", _("^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shockwave%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_THINKING_WITH_PORTALS, 2, 1, "s1 s2loc spree_lost", "s1", "notify_selfkill", _("^BG%s^K1 is now thinking with portals%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_MURDER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weapontuba", _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Tuba%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_SUICIDE, 2, 1, "s1 s2loc spree_lost", "s1", "weapontuba", _("^BG%s^K1 hurt their own ears with the @!#%%'n Tuba%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SNIPE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponuzi", _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"), "") \
- MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponuzi", _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "")
+ MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponuzi", _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "")
-#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+#define MULTITEAM_CENTER2(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+ MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+ MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2)))
+#define MULTITEAM_CENTER3(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
- #if teams >= 3 \
- MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
- #endif \
- #if teams >= 4 \
- MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \
- #endif
+ MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3)))
+#define MULTITEAM_CENTER4(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+ MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
+ MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \
+ MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \
+ MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4)))
+#define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \
+ MULTITEAM_CENTER##teams(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle)
+
#define MSG_CENTER_NOTIFICATIONS \
MSG_CENTER_NOTIF(1, CENTER_ASSAULT_ATTACKING, 0, 0, "", CPID_ASSAULT_ROLE, "0 0", _("^BGYou are attacking!"), "") \
MSG_CENTER_NOTIF(1, CENTER_ASSAULT_DEFENDING, 0, 0, "", CPID_ASSAULT_ROLE, "0 0", _("^BGYou are defending!"), "") \
MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout ends in ^COUNT"), "")
-#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
+#define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \
+ MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+ MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE)
+#define MULTITEAM_MULTI3(default,prefix,anncepre,infopre,centerpre) \
MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
- #if teams >= 3 \
- MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
- #endif \
- #if teams >= 4 \
- MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK) \
- #endif
+ MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW)
+#define MULTITEAM_MULTI4(default,prefix,anncepre,infopre,centerpre) \
+ MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
+ MSG_MULTI_NOTIF(default, prefix##BLUE, anncepre##BLUE, infopre##BLUE, centerpre##BLUE) \
+ MSG_MULTI_NOTIF(default, prefix##YELLOW, anncepre##YELLOW, infopre##YELLOW, centerpre##YELLOW) \
+ MSG_MULTI_NOTIF(default, prefix##PINK, anncepre##PINK, infopre##PINK, centerpre##PINK)
+#define MULTITEAM_MULTI(default,prefix,teams,anncepre,infopre,centerpre) \
+ MULTITEAM_MULTI##teams(default,prefix,anncepre,infopre,centerpre)
+
#define MSG_MULTI_NOTIFICATIONS \
MSG_MULTI_NOTIF(1, DEATH_MURDER_CHEAT, NO_MSG, INFO_DEATH_MURDER_CHEAT, NO_MSG) \
MSG_MULTI_NOTIF(1, DEATH_MURDER_DROWN, NO_MSG, INFO_DEATH_MURDER_DROWN, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_LASER_SUICIDE, NO_MSG, INFO_WEAPON_LASER_SUICIDE, CENTER_DEATH_SELF_GENERIC) \
MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_MURDER, NO_MSG, INFO_WEAPON_MINELAYER_MURDER, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MINELAYER_SUICIDE, NO_MSG, INFO_WEAPON_MINELAYER_SUICIDE, CENTER_DEATH_SELF_GENERIC) \
- MSG_MULTI_NOTIF(1, WEAPON_MINSTANEX_MURDER, NO_MSG, INFO_WEAPON_MINSTANEX_MURDER, NO_MSG) \
+ MSG_MULTI_NOTIF(1, WEAPON_VAPORIZER_MURDER, NO_MSG, INFO_WEAPON_VAPORIZER_MURDER, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_BOUNCE, NO_MSG, INFO_WEAPON_MORTAR_MURDER_BOUNCE, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MORTAR_MURDER_EXPLODE, NO_MSG, INFO_WEAPON_MORTAR_MURDER_EXPLODE, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_MORTAR_SUICIDE_BOUNCE, NO_MSG, INFO_WEAPON_MORTAR_SUICIDE_BOUNCE, CENTER_DEATH_SELF_GENERIC) \
MSG_MULTI_NOTIF(1, WEAPON_SEEKER_SUICIDE, NO_MSG, INFO_WEAPON_SEEKER_SUICIDE, CENTER_DEATH_SELF_GENERIC) \
MSG_MULTI_NOTIF(1, WEAPON_SHOTGUN_MURDER, NO_MSG, INFO_WEAPON_SHOTGUN_MURDER, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_SHOTGUN_MURDER_SLAP, NO_MSG, INFO_WEAPON_SHOTGUN_MURDER_SLAP, NO_MSG) \
+ MSG_MULTI_NOTIF(1, WEAPON_SHOCKWAVE_MURDER, NO_MSG, INFO_WEAPON_SHOCKWAVE_MURDER, NO_MSG) \
+ MSG_MULTI_NOTIF(1, WEAPON_SHOCKWAVE_MURDER_SLAP, NO_MSG, INFO_WEAPON_SHOCKWAVE_MURDER_SLAP, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_THINKING_WITH_PORTALS, NO_MSG, INFO_WEAPON_THINKING_WITH_PORTALS, CENTER_DEATH_SELF_GENERIC) \
MSG_MULTI_NOTIF(1, WEAPON_TUBA_MURDER, NO_MSG, INFO_WEAPON_TUBA_MURDER, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_TUBA_SUICIDE, NO_MSG, INFO_WEAPON_TUBA_SUICIDE, CENTER_DEATH_SELF_GENERIC) \
MSG_MULTI_NOTIF(1, WEAPON_UZI_MURDER_SNIPE, NO_MSG, INFO_WEAPON_UZI_MURDER_SNIPE, NO_MSG) \
MSG_MULTI_NOTIF(1, WEAPON_UZI_MURDER_SPRAY, NO_MSG, INFO_WEAPON_UZI_MURDER_SPRAY, NO_MSG)
-#define MULTITEAM_CHOICE(default,prefix,teams,chtype,optiona,optionb) \
- MSG_CHOICE_NOTIF(default, prefix##RED, chtype, optiona##RED, optionb##RED) \
- MSG_CHOICE_NOTIF(default, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
- #if teams >= 3 \
- MSG_CHOICE_NOTIF(default, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
- #endif \
- #if teams >= 4 \
- MSG_CHOICE_NOTIF(default, prefix##PINK, chtype, optiona##PINK, optionb##PINK) \
- #endif
+#define MULTITEAM_CHOICE2(default,challow,prefix,chtype,optiona,optionb) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE)
+#define MULTITEAM_CHOICE3(default,challow,prefix,chtype,optiona,optionb) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW)
+#define MULTITEAM_CHOICE4(default,challow,prefix,chtype,optiona,optionb) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##RED, chtype, optiona##RED, optionb##RED) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##BLUE, chtype, optiona##BLUE, optionb##BLUE) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##YELLOW, chtype, optiona##YELLOW, optionb##YELLOW) \
+ MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK)
+#define MULTITEAM_CHOICE(default,challow,prefix,teams,chtype,optiona,optionb) \
+ MULTITEAM_CHOICE##teams(default,challow,prefix,chtype,optiona,optionb)
+
#define MSG_CHOICE_NOTIFICATIONS \
- MSG_CHOICE_NOTIF(1, CHOICE_FRAG, MSG_CENTER, CENTER_DEATH_MURDER_FRAG, CENTER_DEATH_MURDER_FRAG_VERBOSE) \
- MSG_CHOICE_NOTIF(1, CHOICE_FRAGGED, MSG_CENTER, CENTER_DEATH_MURDER_FRAGGED, CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \
- MSG_CHOICE_NOTIF(1, CHOICE_TYPEFRAG, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAG, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \
- MSG_CHOICE_NOTIF(1, CHOICE_TYPERFRAGGED, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAGGED, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
+ MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_BROKEN_, 2, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_BROKEN_) \
+ MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_TIME_, 2, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_TIME_) \
+ MULTITEAM_CHOICE(1, 2, CHOICE_CTF_CAPTURE_UNBROKEN_, 2, MSG_INFO, INFO_CTF_CAPTURE_, INFO_CTF_CAPTURE_UNBROKEN_) \
+ MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_TEAM, MSG_CENTER, CENTER_CTF_PICKUP_TEAM, CENTER_CTF_PICKUP_TEAM_VERBOSE) \
+ MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY, CENTER_CTF_PICKUP_ENEMY_VERBOSE) \
+ MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAG, MSG_CENTER, CENTER_DEATH_MURDER_FRAG, CENTER_DEATH_MURDER_FRAG_VERBOSE) \
+ MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAGGED, MSG_CENTER, CENTER_DEATH_MURDER_FRAGGED, CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \
+ MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAG, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAG, CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \
+ MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAGGED, MSG_CENTER, CENTER_DEATH_MURDER_TYPEFRAGGED, CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
//MSG_CHOICE_NOTIF(2, CHOICE_)
#ifdef SVQC
.float FRAG_VERBOSE;
void Notification_GetCvars(void);
-var float autocvar_notification_server_allows_frag_verbose = 1; // 0 = no, 1 = warmup only, 2 = all the time
var float autocvar_notification_server_allows_location = 1; // 0 = no, 1 = yes
#else
var float autocvar_notification_item_centerprinttime = 1.5;
// 0 = no, 1 = yes, 2 = forced on for all MSG_INFO notifs
// DISABLED IN CODE, BUT ENABLED IN CONFIG FOR COMPATIBILITY WITH OLD CLIENTS
-var float autocvar_notification_allow_chatboxprint = 0;
+var float autocvar_notification_allow_chatboxprint = 0;
var float autocvar_notification_show_sprees_center = TRUE;
var float autocvar_notification_show_sprees_center_specialonly = TRUE;
-var float autocvar_notification_frag_verbose = TRUE;
#endif
allows for more dynamic data to be inferred by the local
notification parser, so that the server does not have to network
anything too crazy on a per-client/per-situation basis.
-
+
Pay attention to the CSQC/SVQC relations, some of these are redefined
in slightly different ways for different programs, this is because the
server does a more conservative approach to the notifs than the client.
-
+
All arguments are swapped into strings, so be sure that your
sprintf usage matches with proper %s placement.
-
+
Argument descriptions:
s1-s4: string arguments to be literally swapped into sprintf
s2loc: s2 string of locations of deaths or other events
string notif_arg_frag_stats(float fhealth, float farmor, float fping)
{
- if not(fhealth < 1)
+ if (!(fhealth < 1))
return sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), fhealth, farmor, notif_arg_frag_ping(FALSE, fping));
else
return sprintf(CCR(_("\n(^F4Dead^BG)%s")), notif_arg_frag_ping(FALSE, fping));
string notif_arg_spree_cen(float spree)
{
// 0 = off, 1 = target (but only for first victim) and attacker
- if(autocvar_notification_show_sprees_center)
+ if(autocvar_notification_show_sprees_center)
{
if(spree > 1)
{
#define SPREE_ITEM(counta,countb,center,normal,gentle) \
case counta: { return normal_or_gentle(center, sprintf(_("%d score spree! "), spree)); }
-
+
switch(spree)
{
KILL_SPREE_LIST
default:
{
- if not(autocvar_notification_show_sprees_center_specialonly)
+ if (!autocvar_notification_show_sprees_center_specialonly)
{
return
sprintf(
),
spree);
}
- else { return ""; } // don't show spree information if it isn't an achievement
+ else { return ""; } // don't show spree information if it isn't an achievement
}
}
{
// 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker
// this conditional (& 2) is true for 2 and 3
- if(autocvar_notification_show_sprees_info & 2)
+ if(autocvar_notification_show_sprees_info & 2)
{
#ifdef CSQC
string spree_newline =
string spree_newline =
(autocvar_notification_show_sprees_info_newline ? "\n" : "");
#endif
-
+
if(spree > 1)
{
#define SPREE_ITEM(counta,countb,center,normal,gentle) \
case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
-
+
switch(spree)
{
KILL_SPREE_LIST
default:
{
- if not(autocvar_notification_show_sprees_info_specialonly)
+ if (!autocvar_notification_show_sprees_info_specialonly)
{
return
sprintf(
spree_newline
);
}
- else { return ""; } // don't show spree information if it isn't an achievement
+ else { return ""; } // don't show spree information if it isn't an achievement
}
}
// Initialization/Create Declarations
// ====================================
-#define NOTIF_FIRST 1
-#define NOTIF_MAX 1024 // limit of recursive functions with ACCUMULATE_FUNCTION
-
-// error detection
-float notif_error;
-float notif_global_error;
-
-// notification entities
-entity msg_annce_notifs[NOTIF_MAX];
-entity msg_info_notifs[NOTIF_MAX];
-entity msg_center_notifs[NOTIF_MAX];
-entity msg_multi_notifs[NOTIF_MAX];
-entity msg_choice_notifs[NOTIF_MAX];
-
// notification counts
+#define NOTIF_FIRST 1
float NOTIF_ANNCE_COUNT;
float NOTIF_INFO_COUNT;
float NOTIF_CENTER_COUNT;
float NOTIF_CHOICE_COUNT;
float NOTIF_CPID_COUNT;
-// notification entity values
+// notification limits -- INCREASE AS NECESSARY
+#define NOTIF_ANNCE_MAX 100
+#define NOTIF_INFO_MAX 300
+#define NOTIF_CENTER_MAX 200
+#define NOTIF_MULTI_MAX 200
+#define NOTIF_CHOICE_MAX 20
+
+// notification entities
+entity msg_annce_notifs[NOTIF_ANNCE_MAX];
+entity msg_info_notifs[NOTIF_INFO_MAX];
+entity msg_center_notifs[NOTIF_CENTER_MAX];
+entity msg_multi_notifs[NOTIF_MULTI_MAX];
+entity msg_choice_notifs[NOTIF_CHOICE_MAX];
+
+// common notification entity values
.float nent_default;
-.string nent_name;
-.float nent_id;
.float nent_enabled;
-.entity nent_msgannce;
-.entity nent_msginfo;
-.entity nent_msgcenter;
+.float nent_type;
+.float nent_id;
+.string nent_name;
+.float nent_stringcount;
+.float nent_floatcount;
+
+// MSG_ANNCE entity values
.float nent_channel;
.string nent_snd;
.float nent_vol;
.float nent_position;
-.float nent_stringcount;
-.float nent_floatcount;
-.string nent_args;
-.string nent_hudargs;
-.string nent_icon;
-.float nent_cpid;
-.string nent_durcnt;
-.string nent_string;
-
-.string nent_msgopa;
-.string nent_msgopb;
-
-// networked notification values
+
+// MSG_INFO and MSG_CENTER entity values
+.string nent_args; // used by both
+.string nent_hudargs; // used by info
+.string nent_icon; // used by info
+.float nent_cpid; // used by center
+.string nent_durcnt; // used by center
+.string nent_string; // used by both
+
+// MSG_MULTI entity values
+.entity nent_msgannce;
+.entity nent_msginfo;
+.entity nent_msgcenter;
+
+// MSG_CHOICE entity values
+.float nent_challow_def;
+.float nent_challow_var;
+.entity nent_optiona;
+.entity nent_optionb;
+
+// networked notification entity values
.float nent_broadcast;
.entity nent_client;
.float nent_net_type;
.string nent_strings[4];
.float nent_floats[4];
+// other notification properties
+.float msg_choice_choices[NOTIF_CHOICE_MAX]; // set on each player containing MSG_CHOICE choices
+
+// initialization error detection
+float notif_error;
+float notif_global_error;
+
#define MSG_ANNCE_NOTIF(default,name,channel,sound,volume,position) \
NOTIF_ADD_AUTOCVAR(name, default) \
float name; \
void RegisterNotification_##name() \
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_ANNCE_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_ANNCE_COUNT, "notifications") \
+ CHECK_MAX_COUNT(name, NOTIF_ANNCE_MAX, NOTIF_ANNCE_COUNT, "MSG_ANNCE") \
Create_Notification_Entity( \
- default, /* var_default */ \
- autocvar_notification_##name, /* var_cvar */ \
- MSG_ANNCE, /* typeid */ \
- name, /* nameid */ \
- strtoupper(#name), /* namestring */ \
- NO_MSG, /* anncename */ \
- NO_MSG, /* infoname */ \
- NO_MSG, /* centername */ \
- channel, /* channel */ \
- sound, /* snd */ \
- volume, /* vol */ \
- position, /* position */ \
- NO_MSG, /* strnum */ \
- NO_MSG, /* flnum */ \
- "", /* args */ \
- "", /* hudargs */ \
- "", /* icon */ \
- NO_MSG, /* cpid */ \
- "", /* durcnt */ \
- "", /* normal */ \
- "", /* gentle */ \
- NO_MSG, /* chtype */ \
- NO_MSG, /* optiona */ \
- NO_MSG); /* optionb */ \
+ /* COMMON ======================== */ \
+ default, /* var_default */ \
+ ACVNN(name), /* var_cvar */ \
+ MSG_ANNCE, /* typeid */ \
+ name, /* nameid */ \
+ strtoupper(#name), /* namestring */ \
+ NO_MSG, /* strnum */ \
+ NO_MSG, /* flnum */ \
+ /* ANNCE ============= */ \
+ channel, /* channel */ \
+ sound, /* snd */ \
+ volume, /* vol */ \
+ position, /* position */ \
+ /* INFO & CENTER == */ \
+ "", /* args */ \
+ "", /* hudargs */ \
+ "", /* icon */ \
+ NO_MSG, /* cpid */ \
+ "", /* durcnt */ \
+ "", /* normal */ \
+ "", /* gentle */ \
+ /* MULTI ============= */ \
+ NO_MSG, /* anncename */ \
+ NO_MSG, /* infoname */ \
+ NO_MSG, /* centername */ \
+ /* MSG_CHOICE ========== */ \
+ NO_MSG, /* challow_def */ \
+ NO_MSG, /* challow_var */ \
+ NO_MSG, /* chtype */ \
+ NO_MSG, /* optiona */ \
+ NO_MSG); /* optionb */ \
} \
- ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
#define MSG_INFO_NOTIF(default,name,strnum,flnum,args,hudargs,icon,normal,gentle) \
NOTIF_ADD_AUTOCVAR(name, default) \
void RegisterNotification_##name() \
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_INFO_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_INFO_COUNT, "notifications") \
+ CHECK_MAX_COUNT(name, NOTIF_INFO_MAX, NOTIF_INFO_COUNT, "MSG_INFO") \
Create_Notification_Entity( \
- default, /* var_default */ \
- autocvar_notification_##name, /* var_cvar */ \
- MSG_INFO, /* typeid */ \
- name, /* nameid */ \
- strtoupper(#name), /* namestring */ \
- NO_MSG, /* anncename */ \
- NO_MSG, /* infoname */ \
- NO_MSG, /* centername */ \
- NO_MSG, /* channel */ \
- "", /* snd */ \
- NO_MSG, /* vol */ \
- NO_MSG, /* position */ \
- strnum, /* strnum */ \
- flnum, /* flnum */ \
- args, /* args */ \
- hudargs, /* hudargs */ \
- icon, /* icon */ \
- NO_MSG, /* cpid */ \
- "", /* durcnt */ \
- normal, /* normal */ \
- gentle, /* gentle */ \
- NO_MSG, /* chtype */ \
- NO_MSG, /* optiona */ \
- NO_MSG); /* optionb */ \
+ /* COMMON ======================== */ \
+ default, /* var_default */ \
+ ACVNN(name), /* var_cvar */ \
+ MSG_INFO, /* typeid */ \
+ name, /* nameid */ \
+ strtoupper(#name), /* namestring */ \
+ strnum, /* strnum */ \
+ flnum, /* flnum */ \
+ /* ANNCE =========== */ \
+ NO_MSG, /* channel */ \
+ "", /* snd */ \
+ NO_MSG, /* vol */ \
+ NO_MSG, /* position */ \
+ /* INFO & CENTER === */ \
+ args, /* args */ \
+ hudargs, /* hudargs */ \
+ icon, /* icon */ \
+ NO_MSG, /* cpid */ \
+ "", /* durcnt */ \
+ normal, /* normal */ \
+ gentle, /* gentle */ \
+ /* MULTI ============= */ \
+ NO_MSG, /* anncename */ \
+ NO_MSG, /* infoname */ \
+ NO_MSG, /* centername */ \
+ /* CHOICE ============== */ \
+ NO_MSG, /* challow_def */ \
+ NO_MSG, /* challow_var */ \
+ NO_MSG, /* chtype */ \
+ NO_MSG, /* optiona */ \
+ NO_MSG); /* optionb */ \
} \
- ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
#define MSG_CENTER_NOTIF(default,name,strnum,flnum,args,cpid,durcnt,normal,gentle) \
NOTIF_ADD_AUTOCVAR(name, default) \
{ \
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_MAX_COUNT(name, NOTIF_CENTER_MAX, NOTIF_CENTER_COUNT, "MSG_CENTER") \
Create_Notification_Entity( \
- default, /* var_default */ \
- autocvar_notification_##name, /* var_cvar */ \
- MSG_CENTER, /* typeid */ \
- name, /* nameid */ \
- strtoupper(#name), /* namestring */ \
- NO_MSG, /* anncename */ \
- NO_MSG, /* infoname */ \
- NO_MSG, /* centername */ \
- NO_MSG, /* channel */ \
- "", /* snd */ \
- NO_MSG, /* vol */ \
- NO_MSG, /* position */ \
- strnum, /* strnum */ \
- flnum, /* flnum */ \
- args, /* args */ \
- "", /* hudargs */ \
- "", /* icon */ \
- cpid, /* cpid */ \
- durcnt, /* durcnt */ \
- normal, /* normal */ \
- gentle, /* gentle */ \
- NO_MSG, /* chtype */ \
- NO_MSG, /* optiona */ \
- NO_MSG); /* optionb */ \
+ /* COMMON ======================== */ \
+ default, /* var_default */ \
+ ACVNN(name), /* var_cvar */ \
+ MSG_CENTER, /* typeid */ \
+ name, /* nameid */ \
+ strtoupper(#name), /* namestring */ \
+ strnum, /* strnum */ \
+ flnum, /* flnum */ \
+ /* ANNCE =========== */ \
+ NO_MSG, /* channel */ \
+ "", /* snd */ \
+ NO_MSG, /* vol */ \
+ NO_MSG, /* position */ \
+ /* INFO & CENTER == */ \
+ args, /* args */ \
+ "", /* hudargs */ \
+ "", /* icon */ \
+ cpid, /* cpid */ \
+ durcnt, /* durcnt */ \
+ normal, /* normal */ \
+ gentle, /* gentle */ \
+ /* MULTI ============= */ \
+ NO_MSG, /* anncename */ \
+ NO_MSG, /* infoname */ \
+ NO_MSG, /* centername */ \
+ /* CHOICE ============== */ \
+ NO_MSG, /* challow_def */ \
+ NO_MSG, /* challow_var */ \
+ NO_MSG, /* chtype */ \
+ NO_MSG, /* optiona */ \
+ NO_MSG); /* optionb */ \
} \
- ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
#define MSG_MULTI_NOTIF(default,name,anncename,infoname,centername) \
NOTIF_ADD_AUTOCVAR(name, default) \
void RegisterNotification_##name() \
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_MULTI_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_MULTI_COUNT, "notifications") \
+ CHECK_MAX_COUNT(name, NOTIF_MULTI_MAX, NOTIF_MULTI_COUNT, "MSG_MULTI") \
Create_Notification_Entity( \
- default, /* var_default */ \
- autocvar_notification_##name, /* var_cvar */ \
- MSG_MULTI, /* typeid */ \
- name, /* nameid */ \
- strtoupper(#name), /* namestring */ \
- anncename, /* anncename */ \
- infoname, /* infoname */ \
- centername, /* centername */ \
- NO_MSG, /* channel */ \
- "", /* snd */ \
- NO_MSG, /* vol */ \
- NO_MSG, /* position */ \
- NO_MSG, /* strnum */ \
- NO_MSG, /* flnum */ \
- "", /* args */ \
- "", /* hudargs */ \
- "", /* icon */ \
- NO_MSG, /* cpid */ \
- "", /* durcnt */ \
- "", /* normal */ \
- "", /* gentle */ \
- NO_MSG, /* chtype */ \
- NO_MSG, /* optiona */ \
- NO_MSG); /* optionb */ \
+ /* COMMON ======================== */ \
+ default, /* var_default */ \
+ ACVNN(name), /* var_cvar */ \
+ MSG_MULTI, /* typeid */ \
+ name, /* nameid */ \
+ strtoupper(#name), /* namestring */ \
+ NO_MSG, /* strnum */ \
+ NO_MSG, /* flnum */ \
+ /* ANNCE =========== */ \
+ NO_MSG, /* channel */ \
+ "", /* snd */ \
+ NO_MSG, /* vol */ \
+ NO_MSG, /* position */ \
+ /* INFO & CENTER == */ \
+ "", /* args */ \
+ "", /* hudargs */ \
+ "", /* icon */ \
+ NO_MSG, /* cpid */ \
+ "", /* durcnt */ \
+ "", /* normal */ \
+ "", /* gentle */ \
+ /* MULTI ================= */ \
+ anncename, /* anncename */ \
+ infoname, /* infoname */ \
+ centername, /* centername */ \
+ /* CHOICE ============== */ \
+ NO_MSG, /* challow_def */ \
+ NO_MSG, /* challow_var */ \
+ NO_MSG, /* chtype */ \
+ NO_MSG, /* optiona */ \
+ NO_MSG); /* optionb */ \
} \
- ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
+
+#define ACVNN(name) autocvar_notification_##name
-#define MSG_CHOICE_NOTIF(default,name,chtype,optiona,optionb) \
+#define MSG_CHOICE_NOTIF(default,challow,name,chtype,optiona,optionb) \
NOTIF_ADD_AUTOCVAR(name, default) \
+ NOTIF_ADD_AUTOCVAR(name##_ALLOWED, challow) \
float name; \
void RegisterNotification_##name() \
{ \
SET_FIELD_COUNT(name, NOTIF_FIRST, NOTIF_CHOICE_COUNT) \
- CHECK_MAX_COUNT(name, NOTIF_MAX, NOTIF_CHOICE_COUNT, "notifications") \
+ CHECK_MAX_COUNT(name, NOTIF_CHOICE_MAX, NOTIF_CHOICE_COUNT, "MSG_CHOICE") \
Create_Notification_Entity( \
- default, /* var_default */ \
- autocvar_notification_##name, /* var_cvar */ \
- MSG_CHOICE, /* typeid */ \
- name, /* nameid */ \
- strtoupper(#name), /* namestring */ \
- NO_MSG, /* anncename */ \
- NO_MSG, /* infoname */ \
- NO_MSG, /* centername */ \
- NO_MSG, /* channel */ \
- "", /* snd */ \
- NO_MSG, /* vol */ \
- NO_MSG, /* position */ \
- NO_MSG, /* strnum */ \
- NO_MSG, /* flnum */ \
- "", /* args */ \
- "", /* hudargs */ \
- "", /* icon */ \
- NO_MSG, /* cpid */ \
- "", /* durcnt */ \
- "", /* normal */ \
- "", /* gentle */ \
- chtype, /* chtype */ \
- optiona, /* optiona */ \
- optionb); /* optionb */ \
+ /* COMMON ======================== */ \
+ default, /* var_default */ \
+ ACVNN(name), /* var_cvar */ \
+ MSG_CHOICE, /* typeid */ \
+ name, /* nameid */ \
+ strtoupper(#name), /* namestring */ \
+ NO_MSG, /* strnum */ \
+ NO_MSG, /* flnum */ \
+ /* ANNCE =========== */ \
+ NO_MSG, /* channel */ \
+ "", /* snd */ \
+ NO_MSG, /* vol */ \
+ NO_MSG, /* position */ \
+ /* INFO & CENTER == */ \
+ "", /* args */ \
+ "", /* hudargs */ \
+ "", /* icon */ \
+ NO_MSG, /* cpid */ \
+ "", /* durcnt */ \
+ "", /* normal */ \
+ "", /* gentle */ \
+ /* MULTI ============= */ \
+ NO_MSG, /* anncename */ \
+ NO_MSG, /* infoname */ \
+ NO_MSG, /* centername */ \
+ /* CHOICE ============================================= */ \
+ challow, /* challow_def */ \
+ autocvar_notification_##name##_ALLOWED, /* challow_var */ \
+ chtype, /* chtype */ \
+ optiona, /* optiona */ \
+ optionb); /* optionb */ \
} \
- ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
+ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name);
void RegisterNotifications_First()
{
#else
#define dedi ""
#endif
-
+
print(sprintf("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME));
-
+
// maybe do another implementation of this with checksums? for now, we don't need versioning
/*if(autocvar_notification_version != NOTIF_VERSION)
{
}
// NOW we actually activate the declarations
-ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First)
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_First);
MSG_ANNCE_NOTIFICATIONS
MSG_INFO_NOTIFICATIONS
MSG_CENTER_NOTIFICATIONS
MSG_MULTI_NOTIFICATIONS
MSG_CHOICE_NOTIFICATIONS
-ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done)
+ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done);
#undef MSG_ANNCE_NOTIF
#undef MSG_INFO_NOTIF
#undef MSG_CENTER_NOTIF