Scoreboard UI: fix not being able to switch to the Rankings panel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / scoreboard.qc
index dfab7d61b7c3fae437bd9677357a26be1ba648aa..531e0c35618f04db70303e5bef22dad11326e593 100644 (file)
@@ -277,8 +277,8 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda
                ++scoreboard_selected_panel;
                if (scoreboard_selected_panel == SB_PANEL_RANKINGS && !rankings_cnt)
                        ++scoreboard_selected_panel;
-               if (scoreboard_selected_panel >= SB_PANEL_MAX)
-                       scoreboard_selected_panel = 1;
+               if (scoreboard_selected_panel > SB_PANEL_MAX)
+                       scoreboard_selected_panel = SB_PANEL_FIRST;
 
                scoreboard_selected_panel_time = time;
        }