From: Samual Lenks Date: Thu, 7 Feb 2013 04:34:51 +0000 (-0500) Subject: Allow hud_damage with eventchase camera (this was irrelevant to old bug) X-Git-Tag: xonotic-v0.7.0~100^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=349fd93a0e06a540f879402f4c5518836b7352a4;p=xonotic%2Fxonotic-data.pk3dir.git Allow hud_damage with eventchase camera (this was irrelevant to old bug) --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 6838f3c06..e07a44b48 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -908,25 +908,22 @@ void CSQC_UpdateView(float w, float h) // pro: matches model better // contra: it's not red because blood is red, but because red is an alarming color, so red should stay // maybe different reddish pics? - if(autocvar_chase_active >= 0) // not while the event chase camera is active + if(autocvar_cl_gentle_damage || autocvar_cl_gentle) { - if(autocvar_cl_gentle_damage || autocvar_cl_gentle) + if(autocvar_cl_gentle_damage == 2) { - if(autocvar_cl_gentle_damage == 2) + if(myhealth_flash < pain_threshold) // only randomize when the flash is gone { - if(myhealth_flash < pain_threshold) // only randomize when the flash is gone - { - myhealth_gentlergb = eX * random() + eY * random() + eZ * random(); - } + 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); } else - drawpic(splash_pos, "gfx/blood", splash_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL); + 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); } + else + drawpic(splash_pos, "gfx/blood", splash_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL); if(autocvar_hud_postprocessing) // we still need to set this anyway even when chase_active is set, this way it doesn't get stuck on. { @@ -954,7 +951,7 @@ void CSQC_UpdateView(float w, float h) if(cvar("r_glsl_postprocess_uservec2_enable") != e2) { cvar_set("r_glsl_postprocess_uservec2_enable", ftos(e2)); } // blur postprocess handling done first (used by hud_damage and hud_contents) - if((damage_blurpostprocess_x || content_blurpostprocess_x) && autocvar_chase_active >= 0) // not while the event chase camera is active + if((damage_blurpostprocess_x || content_blurpostprocess_x)) { float blurradius = bound(0, damage_blurpostprocess_y + content_blurpostprocess_y, autocvar_hud_postprocessing_maxblurradius); float bluralpha = bound(0, damage_blurpostprocess_z + content_blurpostprocess_z, autocvar_hud_postprocessing_maxbluralpha); @@ -979,7 +976,7 @@ void CSQC_UpdateView(float w, float h) sharpen_intensity = bound(0, ((getstati(STAT_HEALTH) > 0) ? sharpen_intensity : 0), 5); // Check to see if player is alive (if not, set 0) - also bound to fade out starting at 5 seconds. - if(autocvar_hud_powerup && sharpen_intensity > 0 && autocvar_chase_active >= 0) // not while the event chase camera is active + if(autocvar_hud_powerup && sharpen_intensity > 0) { if(sharpen_intensity != old_sharpen_intensity) // reduce cvar_set spam as much as possible {