]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove override of engine +showscores command
authorbones_was_here <bones_was_here@xonotic.au>
Sun, 22 Jan 2023 20:39:42 +0000 (06:39 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 22 Jan 2023 20:39:42 +0000 (06:39 +1000)
This is unnecessary because it's duplicating the same behaviour already
implemented in DP (and FTEQW), just with a different variable name.

It should be noted that a QC command implementation will be
slower than an engine implementation.

qcsrc/client/command/cl_cmd.qc
qcsrc/client/hud/panel/racetimer.qh
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/hud/panel/scoreboard.qh

index 0f8a69e727d6b43c48bb9eaf17c6ed1a78029e20..93825b086d5cefdbaa3875af30dc217392b0e556 100644 (file)
@@ -551,8 +551,6 @@ void GameCommand(string command)
 // Please add client commands to the function above this, as this is only for special reasons.
 // NOTE: showaccuracy is kept as legacy command
 #define CONSOLE_COMMANDS_NORMAL() \
-       CONSOLE_COMMAND("+showscores", { scoreboard_showscores = true; }) \
-       CONSOLE_COMMAND("-showscores", { scoreboard_showscores = false; }) \
        CONSOLE_COMMAND("+showaccuracy", { }) \
        CONSOLE_COMMAND("-showaccuracy", { }) \
        /* nothing */
index 8f4c09c101ed60b14e7c420f0fd99e681f8c6942..a12e69f7987a3575905a5879fec6f5cb81c70186 100644 (file)
@@ -37,7 +37,7 @@ float race_othercheckpointtime;
 float race_othercheckpointdelta;
 float race_othercheckpointlapsdelta;
 string race_othercheckpointenemy;
-float scoreboard_showscores_force;
+bool scoreboard_showscores_force;
 float race_status;
 string race_status_name;
 float race_myrank;
index 9256d162bc83721c86c06e94f075a5fb4d81391f..61c85d8c5c5263d0c76f2a4b47b4ef5319bada5a 100644 (file)
@@ -169,7 +169,7 @@ bool scoreboard_ui_disabling;
 void HUD_Scoreboard_UI_Disable()
 {
        scoreboard_ui_disabling = true;
-       scoreboard_showscores = false;
+       sb_showscores = false;
 }
 
 void HUD_Scoreboard_UI_Disable_Instantly()
@@ -1564,7 +1564,7 @@ bool Scoreboard_WouldDraw()
                return false;
        else if (HUD_Radar_Clickable())
                return false;
-       else if (scoreboard_showscores)
+       else if (sb_showscores) // set by +showscores engine command
                return true;
        else if (intermission == 1)
                return true;
index 2e13de65ba91c5cd1007bee5f1b9f685198cc89b..b6cf1dab0bca97923de9237a678df0094feddb79 100644 (file)
@@ -5,7 +5,7 @@ bool autocvar_cl_deathscoreboard;
 string autocvar_scoreboard_columns;
 float autocvar_hud_panel_scoreboard_namesize = 15;
 
-bool scoreboard_showscores;
+bool sb_showscores; // set by +showscores engine command
 
 bool scoreboard_active;
 float scoreboard_fade_alpha;