From: Mircea Kitsune Date: Tue, 1 Mar 2011 13:29:48 +0000 (+0200) Subject: Fix possibility of blur getting stuck on when it's not the case to apply it (eg:... X-Git-Tag: xonotic-v0.5.0~173^2~3^2~29 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=708b23af5be915c35675093c53f210687c4b8537;p=xonotic%2Fxonotic-data.pk3dir.git Fix possibility of blur getting stuck on when it's not the case to apply it (eg: your screen remained damage blurred, you restarted Xonotic, and when you connected again you'd be stuck with the last blur state) --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 9299d98ef..7faad6d3b 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -731,7 +731,7 @@ void CSQC_UpdateView(float w, float h) if(autocvar_hud_postprocessing) { - if(autocvar_hud_contents_blur) + if(autocvar_hud_contents_blur && contentavgalpha) { content_blurpostprocess_x = 1; content_blurpostprocess_y = contentavgalpha * autocvar_hud_contents_blur; @@ -808,7 +808,7 @@ void CSQC_UpdateView(float w, float h) if(autocvar_hud_postprocessing) { - if(autocvar_hud_damage_blur) + if(autocvar_hud_damage_blur && myhealth_flash_temp) { damage_blurpostprocess_x = 1; damage_blurpostprocess_y = bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage_blur; @@ -819,7 +819,7 @@ void CSQC_UpdateView(float w, float h) damage_blurpostprocess_x = 0; damage_blurpostprocess_y = 0; damage_blurpostprocess_z = 0; - } + } dprint(strcat(ftos(myhealth_flash_temp), "----------\n")); } }