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://git.rm.cloudns.org/?a=commitdiff_plain;h=1ad2b2c550c99f34862b0deb8a010c350aec2db8;p=xonotic%2Fxonotic-data.pk3dir.git 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 2361ccff7..117badbec 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 1792183f1..74090e14d 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);