]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add another alpha check 240/head
authorterencehill <piuntn@gmail.com>
Wed, 14 Oct 2015 20:41:55 +0000 (22:41 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 14 Oct 2015 20:41:55 +0000 (22:41 +0200)
qcsrc/client/view.qc

index 124a677535cdc83eb997a8ca988631d891df2c6f..c7144372a304b45bdee0cbbcc4036b5681015523 100644 (file)
@@ -1741,14 +1741,13 @@ void CSQC_UpdateView(float w, float h)
                        if(autocvar_cl_gentle_damage == 2)
                        {
                                if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
-                               {
                                        myhealth_gentlergb = eX * random() + eY * random() + eZ * random();
-                               }
                        }
                        else
                                myhealth_gentlergb = stov(autocvar_hud_damage_gentle_color);
 
-                       drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
+                       if(myhealth_flash_temp > 0)
+                               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);
                }
                else if(myhealth_flash_temp > 0)
                        drawpic(splash_pos, "gfx/blood", splash_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL);