From ffac6c9232e818bba0ee32a74605189d990f5911 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 26 Feb 2011 02:15:55 +0200 Subject: [PATCH] don't allow blur to get stuck on if we disable the cvar while damaged --- data/qcsrc/client/View.qc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- 2.39.2