X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fscoreboard.qc;h=76f97fd0e548bec204c9d7060a236b6ad0af7ed3;hp=dfab7d61b7c3fae437bd9677357a26be1ba648aa;hb=f71c1348073e9e72395616da14ef77269b1cfd67;hpb=1da96e958217f87f41d20c0968d51856a801b538 diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index dfab7d61b7..76f97fd0e5 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -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 @@ -272,13 +272,29 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda if (!key_pressed) return true; if (scoreboard_ui_enabled == 2) - goto downarrow_action; + { + if (hudShiftState & S_SHIFT) + goto uparrow_action; + else + goto downarrow_action; + } - ++scoreboard_selected_panel; - if (scoreboard_selected_panel == SB_PANEL_RANKINGS && !rankings_cnt) + if (hudShiftState & S_SHIFT) + { + --scoreboard_selected_panel; + if (scoreboard_selected_panel == SB_PANEL_RANKINGS && !rankings_cnt) + --scoreboard_selected_panel; + if (scoreboard_selected_panel < SB_PANEL_FIRST) + scoreboard_selected_panel = SB_PANEL_MAX; + } + else + { ++scoreboard_selected_panel; - if (scoreboard_selected_panel >= SB_PANEL_MAX) - scoreboard_selected_panel = 1; + if (scoreboard_selected_panel == SB_PANEL_RANKINGS && !rankings_cnt) + ++scoreboard_selected_panel; + if (scoreboard_selected_panel > SB_PANEL_MAX) + scoreboard_selected_panel = SB_PANEL_FIRST; + } scoreboard_selected_panel_time = time; } @@ -344,6 +360,7 @@ float HUD_Scoreboard_InputEvent(float bInputType, float nPrimary, float nSeconda { if (!key_pressed) return true; + LABEL(uparrow_action); if (scoreboard_selected_panel == SB_PANEL_SCOREBOARD) { if (scoreboard_ui_enabled == 2) @@ -1536,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())