]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a mutator hook to force hide the scoreboard
authorMario <mario@smbclan.net>
Fri, 14 Oct 2016 10:22:13 +0000 (20:22 +1000)
committerMario <mario@smbclan.net>
Fri, 14 Oct 2016 10:22:13 +0000 (20:22 +1000)
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/mutators/events.qh

index 2361ccff7a0a585ed1e5a7d444d4aad051a37612..117badbec4e1baf80aca961ff8d22042534d8dd2 100644 (file)
@@ -1090,7 +1090,9 @@ vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size)
 
 bool Scoreboard_WouldDraw()
 {
 
 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;
                return false;
        else if (HUD_Radar_Clickable())
                return false;
index 1792183f1ccd6e5f5d7da6f9ca3ef1969b175397..74090e14d6992749c8b747c04894a20279c8d7bf 100644 (file)
@@ -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 crosshair */
 MUTATOR_HOOKABLE(DrawCrosshair, EV_NO_ARGS);
+
+/** Return true to not draw scoreboard */
+MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS);