]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow to toggle the scoreboard even when the game is paused
authorterencehill <piuntn@gmail.com>
Fri, 5 Aug 2016 20:23:20 +0000 (22:23 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 5 Aug 2016 20:23:20 +0000 (22:23 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 4a7a8b65639a987dbea84b6edfa2177a789f0630..c53971f40f4f2f87edfa22834719c6300934ad0d 100644 (file)
@@ -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;