From: bones_was_here Date: Sun, 22 Jan 2023 20:39:42 +0000 (+1000) Subject: Remove override of engine +showscores command X-Git-Tag: xonotic-v0.8.6~170^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e423f46315fb4025c8a58bbf56e2c1d66b4bf79f;p=xonotic%2Fxonotic-data.pk3dir.git Remove override of engine +showscores command 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. --- diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index 0f8a69e72..93825b086 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -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 */ diff --git a/qcsrc/client/hud/panel/racetimer.qh b/qcsrc/client/hud/panel/racetimer.qh index 8f4c09c10..a12e69f79 100644 --- a/qcsrc/client/hud/panel/racetimer.qh +++ b/qcsrc/client/hud/panel/racetimer.qh @@ -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; diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 9256d162b..61c85d8c5 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -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; diff --git a/qcsrc/client/hud/panel/scoreboard.qh b/qcsrc/client/hud/panel/scoreboard.qh index 2e13de65b..b6cf1dab0 100644 --- a/qcsrc/client/hud/panel/scoreboard.qh +++ b/qcsrc/client/hud/panel/scoreboard.qh @@ -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;