.float FRAG_VERBOSE;
void Notification_GetCvars(void);
#else
-var float autocvar_notification_allow_chatboxprint = TRUE;
+var float autocvar_notification_allow_chatboxprint = 1; // 0 = no, 1 = yes, 2 = forced on for all MSG_INFO notifs
var float autocvar_notification_show_sprees_center = TRUE;
var float autocvar_notification_show_sprees_center_specialonly = TRUE;
var float autocvar_notification_frag_verbose = TRUE;
string notif_arg_spree_inf(float type, string input, string player, float spree)
{
- // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker
- // this conditional (& 2) is true for 2 and 3
switch(type)
{
case 1: // attacker kill spree
{
+ // 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)
{
#ifdef CSQC
- string spree_newline = (autocvar_notification_show_sprees_info_newline ? ((substring(input, 0, 1) == "\{3}") ? "\n\{3}" : "\n") : "");
+ string spree_newline =
+ ( autocvar_notification_show_sprees_info_newline ?
+ ((substring(input, 0, 1) == "\{3}") ? "\n\{3}" : "\n") : "" );
#else
- string spree_newline = (autocvar_notification_show_sprees_info_newline ? "\n" : "");
+ string spree_newline =
+ (autocvar_notification_show_sprees_info_newline ? "\n" : "");
#endif
if(spree > 1)
ARG_CASE(ARG_DOUBLE, "f2p2dec", ftos_decimals(f2/100, 2)) \
ARG_CASE(ARG_CSQC, "pass_key", ((((tmp_s = getcommandkey("pass", "+use")) != "pass") && !(strstrofs(tmp_s, "not bound", 0) >= 0)) ? sprintf(CCR(_(" ^F1(Press %s)")), tmp_s) : "")) \
ARG_CASE(ARG_CSQC, "frag_ping", ((f2 != NO_MSG) ? sprintf(CCR(_("\n(Ping ^2%d^BG)")), f2) : "")) \
- ARG_CASE(ARG_CSQC, "frag_stats", sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), f1, f2, ((f3 != NO_MSG) ? sprintf(CCR(_(" (Ping ^2%d^BG)")), f3) : ""))) \
+ ARG_CASE(ARG_CSQC, "frag_stats", sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), f2, f3, ((f4 != NO_MSG) ? sprintf(CCR(_(" (Ping ^2%d^BG)")), f4) : ""))) \
/*ARG_CASE(ARG_CSQC, "frag_pos", ((Should_Print_Score_Pos(f1)) ? sprintf("\n^BG%s", Read_Score_Pos(f1)) : ""))*/ \
ARG_CASE(ARG_CSQC, "spree_cen", (autocvar_notification_show_sprees ? notif_arg_spree_cen(f1) : "")) \
ARG_CASE(ARG_CSQC, "spree_inf", (autocvar_notification_show_sprees ? notif_arg_spree_inf(1, input, s2, f2) : "")) \
// pass 2: add STX char at end of each new line (so that messages with multiple lines are put through chatbox too)
input = strreplace("\n", "\n\{3}", input);
- //print(sprintf("foobar: '%s', '%s'... '%s'\n", strreplace("\n", "\\n", substring(input, (strlen(input) - 1), 1)), strreplace("\n", "\\n", input), strreplace("\n", "\\n", substring(input, 0, (strlen(input) - 1)))));
-
// pass 3: strip trailing STX char
if(substring(input, (strlen(input) - 1), 1) == "\{3}")
{ input = substring(input, 0, (strlen(input) - 1)); }