From 248fbfc15190702829516d624abea6f515dc8258 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 5 Aug 2016 22:23:20 +0200 Subject: [PATCH] Allow to toggle the scoreboard even when the game is paused --- qcsrc/client/hud/panel/scoreboard.qc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 4a7a8b656..c53971f40 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1253,18 +1253,19 @@ void Scoreboard_Draw() { if(!autocvar__hud_configure) { + // frametime checks allow to toggle the scoreboard even when the game is paused if(scoreboard_active) { if(menu_enabled == 1) scoreboard_fade_alpha = 1; float scoreboard_fadeinspeed = autocvar_hud_panel_scoreboard_fadeinspeed; - if (scoreboard_fadeinspeed) + if (scoreboard_fadeinspeed && frametime) scoreboard_fade_alpha = min(1, scoreboard_fade_alpha + frametime * scoreboard_fadeinspeed); else scoreboard_fade_alpha = 1; } else { float scoreboard_fadeoutspeed = autocvar_hud_panel_scoreboard_fadeoutspeed; - if (scoreboard_fadeoutspeed) + if (scoreboard_fadeoutspeed && frametime) scoreboard_fade_alpha = max(0, scoreboard_fade_alpha - frametime * scoreboard_fadeoutspeed); else scoreboard_fade_alpha = 0; -- 2.39.2