From 3b6e138d693e3e75e7263fb44041ef7261a8b602 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 19 Oct 2020 13:09:36 +1000 Subject: [PATCH] Add a mutator hook to allow mutators to force drawing of the scoreboard --- qcsrc/client/hud/panel/scoreboard.qc | 2 +- qcsrc/client/mutators/events.qh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 7f3c8e5c2..7db383a39 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1151,7 +1151,7 @@ bool Scoreboard_WouldDraw() { return true; } - else if (scoreboard_showscores_force) + else if (scoreboard_showscores_force || MUTATOR_CALLHOOK(DrawScoreboard_Force)) return true; return false; } diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index c606906ab..7115ed4df 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -172,6 +172,9 @@ MUTATOR_HOOKABLE(DrawCrosshair, EV_NO_ARGS); /** Return true to not draw scoreboard */ MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS); +/** Return true to force showing of the scoreboard */ +MUTATOR_HOOKABLE(DrawScoreboard_Force, EV_NO_ARGS); + /** Return true to not draw scoreboard while dead */ MUTATOR_HOOKABLE(DrawDeathScoreboard, EV_NO_ARGS); -- 2.39.2