]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Forbid opening scoreboard team selection when the game is over
authorterencehill <piuntn@gmail.com>
Tue, 7 Jun 2022 22:05:02 +0000 (00:05 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 7 Jun 2022 22:05:02 +0000 (00:05 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 1d9268a03734508c71ec718fb57f63fb5cbb2a28..76f97fd0e548bec204c9d7060a236b6ad0af7ed3 100644 (file)
@@ -180,7 +180,7 @@ void Scoreboard_UI_Enable(int mode)
 {
        if (mode == 1)
        {
-               if (scoreboard_ui_enabled == 2 || !teamplay)
+               if (scoreboard_ui_enabled == 2 || !teamplay || intermission)
                        return;
 
                // release player's pressed keys as they aren't released elsewhere
@@ -1553,7 +1553,14 @@ vector Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size)
 bool Scoreboard_WouldDraw()
 {
        if (scoreboard_ui_enabled)
+       {
+               if (intermission && scoreboard_ui_enabled == 2)
+               {
+                       HUD_Scoreboard_UI_Disable();
+                       return false;
+               }
                return true;
+       }
        else if (MUTATOR_CALLHOOK(DrawScoreboard))
                return false;
        else if (QuickMenu_IsOpened())