]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Darkness nade: avoid drawing another useless color flash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index c9de0d15626ceb79ebf58aadbcf32b523ef5953f..7e944089917d911e8ea005f7b1deabad3c7cc672 100644 (file)
@@ -860,7 +860,10 @@ void HUD_Draw(entity this)
        {
                if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
                {
-                       drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
+                       vector col = M_ARGV(0, vector);
+                       float alpha_multipl = M_ARGV(1, float);
+                       if (alpha_multipl > 0)
+                               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha * alpha_multipl, DRAWFLAG_ADDITIVE);
                }
                else if(STAT(FROZEN))
                {