]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into develop
authorMario <mario.mario@y7mail.com>
Sat, 7 Nov 2020 05:09:04 +0000 (15:09 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 7 Nov 2020 05:09:04 +0000 (15:09 +1000)
1  2 
qcsrc/client/view.qc

diff --combined qcsrc/client/view.qc
index 0593fdfb2d4bc86c03ef7db34e60ee1ac40a0ec8,c3a93cd052dac5aec44f354521596e826a33a9df..e0e9fdd8aa5acade4ab13f57da933dcedf476a15
@@@ -944,9 -944,11 +944,11 @@@ void HUD_Draw(entity this
        else if(STAT(FROZEN))
        {
                vector col = '0.25 0.90 1';
-               if(STAT(REVIVE_PROGRESS))
-                       col += vec3(STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS));
-               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               float col_fade = max(0, STAT(REVIVE_PROGRESS) * 2 - 1);
+               float alpha_fade = 0.3 + 0.7 * (1 - max(0, STAT(REVIVE_PROGRESS) * 4 - 3));
+               if(col_fade)
+                       col += vec3(col_fade, -col_fade, -col_fade);
+               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha * alpha_fade, DRAWFLAG_ADDITIVE);
        }
  
        HUD_Scale_Enable();
@@@ -1694,12 -1696,7 +1696,12 @@@ void CSQC_UpdateView(entity this, floa
        {
                if(calledhooks & HOOK_START)
                {
 +                      int gamecount = cvar("cl_matchcount");
                        localcmd("\ncl_hook_gameend\n");
 +                      // NOTE: using localcmd here to ensure it's executed AFTER cl_hook_gameend
 +                      // earlier versions of the game abuse the hook to set this cvar
 +                      localcmd(strcat("cl_matchcount ", itos(gamecount + 1), "\n"));
 +                      //cvar_set("cl_matchcount", itos(gamecount + 1));
                        calledhooks |= HOOK_END;
                }
        }