From: terencehill Date: Wed, 14 Oct 2015 20:41:55 +0000 (+0200) Subject: Add another alpha check X-Git-Tag: xonotic-v0.8.2~1799^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=321945c676b0326a4e54a22db6c9cdbbb6060094;p=xonotic%2Fxonotic-data.pk3dir.git Add another alpha check --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 124a67753..c7144372a 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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);