Forbid opening scoreboard team selection when the game is over
[xonotic/xonotic-data.pk3dir.git] / 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())