]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Partly reduce CCR usage elsewhere
authorotta8634 <k9wolf@pm.me>
Thu, 12 Sep 2024 04:16:45 +0000 (12:16 +0800)
committerotta8634 <k9wolf@pm.me>
Thu, 12 Sep 2024 04:16:45 +0000 (12:16 +0800)
qcsrc/client/main.qc
qcsrc/common/notifications/all.qh

index 9cf0185ed268b7d01e4bdbe35b4221ab3d4b72f2..c584a2892a6b779647fb86c7df726d0f8ae9337a 100644 (file)
@@ -1424,9 +1424,9 @@ bool net_handle_ServerWelcome()
                // (that client doesn't know) by replacing the keyword _LEVEL_DESC
                string key = getcommandkey(_("jump"), "+jump");
                string msg = strcat(
-                       CCR("^F1"), sprintf(_("Level %d:"), campaign_level),
-                       sprintf(CCR(" ^BG%s\n\n"), "_LEVEL_DESC"),
-                       sprintf(CCR(_("^BGPress ^F2%s^BG to enter the game")), key));
+                       CCR_F1, sprintf(_("Level %d:"), campaign_level), " ",
+                       CCR_BG, sprintf("%s\n\n", "_LEVEL_DESC"),
+                       CCR_BG, sprintf(CCR(_("Press ^F2%s^BG to enter the game")), key));
                msg = MakeConsoleSafe(strreplace("\n", "\\n", msg));
                string welcomedialog_args = strcat("CAMPAIGN ", itos(campaign_level), " \"", msg, "\"");
 
index e56658a682e124e33f4018109e22b7922a313224..b20c607a4863d354c50e92122202661c03203914 100644 (file)
@@ -438,7 +438,7 @@ string BUFF_NAME(int i);
        ARG_CASE(ARG_CS_SV_HA,  "f1race_time",   TIME_ENCODED_TOSTRING(f1, true)) \
        ARG_CASE(ARG_CS_SV_HA,  "f2race_time",   TIME_ENCODED_TOSTRING(f2, true)) \
        ARG_CASE(ARG_CS_SV_HA,  "f3race_time",   TIME_ENCODED_TOSTRING(f3, true)) \
-       ARG_CASE(ARG_CS_SV,     "race_col",      CCR((f1 == 1) ? "^F1" : "^F2")) \
+       ARG_CASE(ARG_CS_SV,     "race_col",      ((f1 == 1) ? CCR_F1 : CCR_F2)) \
        ARG_CASE(ARG_CS_SV,     "race_diff",     ((f2 > f3) ? sprintf("^1[+%s]", TIME_ENCODED_TOSTRING(f2 - f3, true)) : sprintf("^2[-%s]", TIME_ENCODED_TOSTRING(f3 - f2, true)))) \
        ARG_CASE(ARG_CS,        "missing_teams", notif_arg_missing_teams(f1)) \
        ARG_CASE(ARG_CS,        "pass_key",      getcommandkey(_("drop flag"), "+use")) \