From: Mario Date: Fri, 14 Oct 2016 10:22:13 +0000 (+1000) Subject: Add a mutator hook to force hide the scoreboard X-Git-Tag: xonotic-v0.8.2~514 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=1ad2b2c550c99f34862b0deb8a010c350aec2db8 Add a mutator hook to force hide the scoreboard --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 2361ccff7a..117badbec4 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1090,7 +1090,9 @@ vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size) bool Scoreboard_WouldDraw() { - if (QuickMenu_IsOpened()) + if (MUTATOR_CALLHOOK(DrawScoreboard)) + return false; + else if (QuickMenu_IsOpened()) return false; else if (HUD_Radar_Clickable()) return false; diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index 1792183f1c..74090e14d6 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -154,3 +154,6 @@ MUTATOR_HOOKABLE(Ent_Update, EV_Ent_Update); /** Return true to not draw crosshair */ MUTATOR_HOOKABLE(DrawCrosshair, EV_NO_ARGS); + +/** Return true to not draw scoreboard */ +MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS);