From 468bf62e2d24a7522d925249235773e70ba50dae Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 1 Mar 2011 16:59:09 +0200 Subject: [PATCH] Fix a few other checks and things regarding the blur effect --- data/defaultVoretournament.cfg | 2 +- data/qcsrc/client/View.qc | 6 ++++-- data/qcsrc/menu/voret/dialog_settings_effects.c | 5 ++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index 6db16720..68b81016 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -1106,7 +1106,7 @@ seta hud_stomach_fade_out 0.03 "how quickly the stomach splash disappears when y seta hud_postprocessing 1 "enables the ability for effects such as hud_damage_blur and hud_contents to apply a postprocessing method upon the screen - enabling this disables manual editing of the postprocess cvars" seta hud_postprocessing_maxbluralpha 0.5 "maximum alpha which the blur postprocess can be" -seta hud_postprocessing_maxblurradius 10 "maximum radius which the blur postprocess can be" +seta hud_postprocessing_maxblurradius 8 "maximum radius which the blur postprocess can be" seta hud_contents 1 "an improved version of gl_polyblend for liquids such as water/lava/slime, draw a filler when inside the liquid" seta hud_contents_liquid_blur 10 "Use postprocessing to blur the screen when you are inside a liquid. Higher values = more blur" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 3e21c77e..7bf9b48a 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -740,13 +740,15 @@ void CSQC_UpdateView(float w, float h) } } - if not(cvar("hud_damage") && cvar("hud_postprocessing")) + if(cvar("hud_postprocessing") && !cvar("hud_postprocessing_maxbluralpha")) + if(cvar("r_glsl_postprocess_uservec1_enable")) { // 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"); } - if not(cvar("hud_powerup") && cvar("hud_postprocessing")) + if(cvar("hud_postprocessing") && !cvar("hud_powerup")) + if(cvar("r_glsl_postprocess_uservec2_enable")) { // don't allow sharpen to get stuck on if we disable the cvar while powered up cvar_set("r_glsl_postprocess_uservec2", "0 0 0 0"); diff --git a/data/qcsrc/menu/voret/dialog_settings_effects.c b/data/qcsrc/menu/voret/dialog_settings_effects.c index f3f493eb..2558a0ac 100644 --- a/data/qcsrc/menu/voret/dialog_settings_effects.c +++ b/data/qcsrc/menu/voret/dialog_settings_effects.c @@ -173,10 +173,9 @@ void fillVoretEffectsSettingsTab(entity me) e.savedValue = 0.5; // default me.TD(me, 1, 2, s); me.TR(me); - me.TD(me, 1, 2, e = makeVoretCheckBoxEx(0.65, 0, "hud_damage", "Screen splashes & Blur")); // must match defaults - makeMulti(e, "hud_stomach"); + me.TD(me, 1, 2, e = makeVoretCheckBoxEx(0.5, 0, "hud_postprocessing_maxbluralpha", "Screen blur")); // must match defaults me.TD(me, 1, 1, e = makeVoretCheckBoxEx(0.5, 0, "hud_powerup", "Sharpening")); // must match defaults - + me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, makeVoretCommandButton("Apply immediately", '0 0 0', "vid_restart", COMMANDBUTTON_APPLY)); } -- 2.39.2