{
float e1 = (autocvar_hud_postprocessing_maxbluralpha != 0);
float e2 = (autocvar_hud_powerup != 0);
+ bool want_postprocessing = false;
if(autocvar_hud_postprocessing && (e1 || e2)) // TODO: Remove this code and re-do the postprocess handling in the engine, where it properly belongs.
{
// enable or disable rendering types if they are used or not
old_blurradius = blurradius;
old_bluralpha = bluralpha;
}
+ want_postprocessing = true;
}
else if(cvar_string("r_glsl_postprocess_uservec1") != "0 0 0 0") // reduce cvar_set spam as much as possible
{
cvar_set("r_glsl_postprocess_uservec2", strcat(ftos((sharpen_intensity / 5) * autocvar_hud_powerup), " ", ftos(-sharpen_intensity * autocvar_hud_powerup), " 0 0"));
old_sharpen_intensity = sharpen_intensity;
}
+ want_postprocessing = true;
}
else if(cvar_string("r_glsl_postprocess_uservec2") != "0 0 0 0") // reduce cvar_set spam as much as possible
{
cvar_set("r_glsl_postprocess_uservec2", "0 0 0 0");
old_sharpen_intensity = 0;
}
-
+ }
+ if (want_postprocessing)
+ {
if(cvar("r_glsl_postprocess") == 0)
cvar_set("r_glsl_postprocess", "2");
}
- else if(cvar("r_glsl_postprocess") == 2)
- cvar_set("r_glsl_postprocess", "0");
+ else
+ {
+ if(cvar("r_glsl_postprocess") == 2)
+ cvar_set("r_glsl_postprocess", "0");
+ }
}
void View_Lock()