From: terencehill Date: Fri, 5 Aug 2016 20:23:20 +0000 (+0200) Subject: Allow to toggle the scoreboard even when the game is paused X-Git-Tag: xonotic-v0.8.2~716^2~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=248fbfc15190702829516d624abea6f515dc8258;p=xonotic%2Fxonotic-data.pk3dir.git Allow to toggle the scoreboard even when the game is paused --- 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;