From 1d57f400287db99c365aecf3665079d14891c07e Mon Sep 17 00:00:00 2001
From: terencehill <piuntn@gmail.com>
Date: Tue, 19 Jun 2018 20:56:56 +0200
Subject: [PATCH] scoreboard_columns_set expand_default: loads default layout
 and expands it into the cvar scoreboard_columns so you can edit it

---
 qcsrc/client/hud/panel/scoreboard.qc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc
index 558ecdc47..91d9f6f70 100644
--- a/qcsrc/client/hud/panel/scoreboard.qc
+++ b/qcsrc/client/hud/panel/scoreboard.qc
@@ -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
-- 
2.39.5