]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
scoreboard_columns_set expand_default: loads default layout and expands it into the... 571/head
authorterencehill <piuntn@gmail.com>
Tue, 19 Jun 2018 18:56:56 +0000 (20:56 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 19 Jun 2018 18:56:56 +0000 (20:56 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 558ecdc47ab619500983729a7f4617fa93c28f49..91d9f6f70d9757635c97ffe4136d504e325925dd 100644 (file)
@@ -298,6 +298,7 @@ void Cmd_Scoreboard_Help()
        LOG_INFO(_("^2scoreboard_columns_set ^3field1 field2 ..."));
        LOG_INFO(_("^2scoreboard_columns_set ^7without arguments reads the arguments from the cvar scoreboard_columns"));
        LOG_INFO(_("  ^5Note: ^7scoreboard_columns_set without arguments is executed on every map start"));
+       LOG_INFO(_("^2scoreboard_columns_set ^3expand_default ^7loads default layout and expands it into the cvar scoreboard_columns so you can edit it"));
        LOG_INFO(_("You can use a ^3|^7 to start the right-aligned fields."));
        LOG_INFO(_("The following field names are recognized (case insensitive):"));
        LOG_INFO("");
@@ -403,8 +404,12 @@ void Cmd_Scoreboard_SetFields(int argc)
 
        if(argc == 3)
        {
-               if(argv(2) == "default")
+               if(argv(2) == "default" || argv(2) == "expand_default")
+               {
+                       if(argv(2) == "expand_default")
+                               cvar_set("scoreboard_columns", SCOREBOARD_DEFAULT_COLUMNS);
                        argc = tokenizebyseparator(strcat("0 1 ", SCOREBOARD_DEFAULT_COLUMNS), " ");
+               }
                else if(argv(2) == "all")
                {
                        string s = "ping pl name |"; // scores without a label