From: Mario Date: Mon, 19 Oct 2020 03:09:36 +0000 (+1000) Subject: Add a mutator hook to allow mutators to force drawing of the scoreboard X-Git-Tag: xonotic-v0.8.5~720 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=3b6e138d693e3e75e7263fb44041ef7261a8b602;p=xonotic%2Fxonotic-data.pk3dir.git Add a mutator hook to allow mutators to force drawing of the scoreboard --- 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);