]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
don't allow blur to get stuck on if we disable the cvar while damaged
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 00:15:55 +0000 (02:15 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 00:15:55 +0000 (02:15 +0200)
data/qcsrc/client/View.qc

index 0b37bef0d349dd267ddc7ab329bee25081f1e7eb..42a685260d2bd14aa541623597104abaf4eb1cac 100644 (file)
@@ -620,7 +620,8 @@ void CSQC_UpdateView(float w, float h)
        }\r
 \r
        if(cvar("hud_postprocessing"))\r
-       { // lets apply the postprocess effects from the previous two functions if needed\r
+       {\r
+               // lets apply the postprocess effects from the previous two functions if needed\r
                if(damage_blurpostprocess_x || content_blurpostprocess_x)\r
                {\r
                        float blurradius = bound(0, damage_blurpostprocess_y + content_blurpostprocess_y, cvar("hud_postprocessing_maxblurradius"));\r
@@ -635,6 +636,13 @@ void CSQC_UpdateView(float w, float h)
                }\r
        }\r
 \r
+       if not(cvar("hud_damage") && cvar("hud_postprocessing"))\r
+       {\r
+               // don't allow blur to get stuck on if we disable the cvar while damaged\r
+               cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");\r
+               cvar_set("r_glsl_postprocess_uservec1_enable", "0");\r
+       }\r
+\r
        // Draw the mouse cursor\r
        // NOTE: drawpic must happen after R_RenderScene for some reason\r
        //drawpic(getmousepos(), "gfx/cursor.tga", '11 14 0', '1 1 1', 1, 0);\r