]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/notifications/all.qh
Logging: tidy
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / notifications / all.qh
index 22f2006a7293b11c3c6ee8215fda7496ef618b02..36bf248eb68ea71f6c06e6aacaac4987c42235c8 100644 (file)
@@ -6,6 +6,10 @@
 #include <common/teams.qh>
 #include <common/util.qh>
 
+#ifdef CSQC
+#include <client/autocvars.qh>
+#endif
+
 /** main types/groups of notifications */
 ENUMCLASS(MSG)
        /** "Global" AND "personal" announcer messages */
@@ -192,7 +196,7 @@ GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt"
                default:
                case CMD_REQUEST_USAGE:
                {
-                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"));
+                       LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]");
                        LOG_INFO("  Where 'filename' is the file to write (default is notifications_dump.cfg),\n");
                        LOG_INFO("  if supplied with '-' output to console as well as default,\n");
                        LOG_INFO("  if left blank, it will only write to default.\n");
@@ -402,14 +406,14 @@ string BUFF_NAME(int i);
        ARG_CASE(ARG_CS_SV_DC,  "f2",            ftos(f2)) \
        ARG_CASE(ARG_CS_SV,     "f3",            ftos(f3)) \
        ARG_CASE(ARG_CS_SV,     "f4",            ftos(f4)) \
-       ARG_CASE(ARG_CS_SV,     "f1p2dec",       ftos_decimals(f1/100, 2)) \
-       ARG_CASE(ARG_CS_SV,     "f2p2dec",       ftos_decimals(f2/100, 2)) \
+       ARG_CASE(ARG_CS_SV,     "f1dtime",       ftos_decimals(TIME_DECODE(f1), 2)) \
+       ARG_CASE(ARG_CS_SV,     "f2dtime",       ftos_decimals(TIME_DECODE(f2), 2)) \
        ARG_CASE(ARG_CS,        "f2primsec",     (f2 ? _("secondary") : _("primary"))) \
        ARG_CASE(ARG_CS,        "f3primsec",     (f3 ? _("secondary") : _("primary"))) \
        ARG_CASE(ARG_CS,        "f1secs",        count_seconds(f1)) \
        ARG_CASE(ARG_CS,        "f1points",      (f1 == 1 ? _("point") : _("points"))) \
        ARG_CASE(ARG_CS_SV,     "f1ord",         count_ordinal(f1)) \
-       ARG_CASE(ARG_CS,        "f1time",        process_time(2, f1)) \
+       ARG_CASE(ARG_CS_SV,     "f1time",        process_time(2, f1)) \
        ARG_CASE(ARG_CS_SV_HA,  "f1race_time",   mmssss(f1)) \
        ARG_CASE(ARG_CS_SV_HA,  "f2race_time",   mmssss(f2)) \
        ARG_CASE(ARG_CS_SV_HA,  "f3race_time",   mmssss(f3)) \
@@ -470,11 +474,11 @@ string notif_arg_frag_stats(float fhealth, float farmor, float fping)
 
 string notif_arg_missing_teams(float f1)
 {
-       return sprintf("%s%s%s%s",
-               ((f1 & BIT(0)) ? sprintf("%s%s", Team_ColoredFullName(NUM_TEAM_1), (f1 & (BIT(1) | BIT(2) | BIT(3)) ? ", " : "")) : ""),
-               ((f1 & BIT(1)) ? sprintf("%s%s", Team_ColoredFullName(NUM_TEAM_2), (f1 & (         BIT(2) | BIT(3)) ? ", " : "")) : ""),
-               ((f1 & BIT(2)) ? sprintf("%s%s", Team_ColoredFullName(NUM_TEAM_3), (f1 & (                  BIT(3)) ? ", " : "")) : ""),
-               ((f1 & BIT(3)) ?                 Team_ColoredFullName(NUM_TEAM_4)                                                 : "")
+       return strcat(
+               ((f1 & BIT(0)) ? strcat(Team_ColoredFullName(NUM_TEAM_1), (f1 >> 1) ? ", " : "") : ""),
+               ((f1 & BIT(1)) ? strcat(Team_ColoredFullName(NUM_TEAM_2), (f1 >> 2) ? ", " : "") : ""),
+               ((f1 & BIT(2)) ? strcat(Team_ColoredFullName(NUM_TEAM_3), (f1 >> 3) ? ", " : "") : ""),
+               ((f1 & BIT(3)) ?        Team_ColoredFullName(NUM_TEAM_4)                         : "")
        );
 }