From: MirceaKitsune Date: Sat, 26 Feb 2011 00:15:55 +0000 (+0200) Subject: don't allow blur to get stuck on if we disable the cvar while damaged X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ffac6c9232e818bba0ee32a74605189d990f5911;p=voretournament%2Fvoretournament.git don't allow blur to get stuck on if we disable the cvar while damaged --- diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 0b37bef0..42a68526 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -620,7 +620,8 @@ void CSQC_UpdateView(float w, float h) } if(cvar("hud_postprocessing")) - { // lets apply the postprocess effects from the previous two functions if needed + { + // lets apply the postprocess effects from the previous two functions if needed if(damage_blurpostprocess_x || content_blurpostprocess_x) { float blurradius = bound(0, damage_blurpostprocess_y + content_blurpostprocess_y, cvar("hud_postprocessing_maxblurradius")); @@ -635,6 +636,13 @@ void CSQC_UpdateView(float w, float h) } } + if not(cvar("hud_damage") && cvar("hud_postprocessing")) + { + // don't allow blur to get stuck on if we disable the cvar while damaged + cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0"); + cvar_set("r_glsl_postprocess_uservec1_enable", "0"); + } + // Draw the mouse cursor // NOTE: drawpic must happen after R_RenderScene for some reason //drawpic(getmousepos(), "gfx/cursor.tga", '11 14 0', '1 1 1', 1, 0);