From: MirceaKitsune Date: Sat, 26 Feb 2011 15:18:39 +0000 (+0200) Subject: Use different content blur cvars for the stomach X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=790a3b06b7899635a564163c033c9ff8a48c7f1b;p=voretournament%2Fvoretournament.git Use different content blur cvars for the stomach --- diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index bc25fc9f..cc23364a 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -1094,8 +1094,10 @@ seta hud_postprocessing_maxbluralpha 0.5 "maximum alpha which the blur postproce seta hud_postprocessing_maxblurradius 10 "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_blur 10 "Use postprocessing to blur the screen when you are inside a liquid. Higher values = more blur" -seta hud_contents_blur_alpha 0.5 "Amount of alpha to use when merging the blurred layers back into the render. Turning this up higher will remove bloom, so it's best to find a balance" +seta hud_contents_liquid_blur 10 "Use postprocessing to blur the screen when you are inside a liquid. Higher values = more blur" +seta hud_contents_liquid_blur_alpha 0.5 "Amount of alpha to use when merging the blurred layers back into the render. Turning this up higher will remove bloom, so it's best to find a balance" +seta hud_contents_stomach_blur 2 "Use postprocessing to blur the screen when you are inside the stomach. Higher values = more blur" +seta hud_contents_stomach_blur_alpha 0.2 "Amount of alpha to use when merging the blurred layers back into the render. Turning this up higher will remove bloom, so it's best to find a balance" seta hud_contents_factor 1 "factor at which to multiply the current faded value." seta hud_contents_fadeintime 0.02 "factor of time it takes for the alpha level to reach normal value when entering the liquid" seta hud_contents_fadeouttime 0.1 "factor of time it takes for the alpha level to reach normal value when leaving the liquid" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 37926193..41cfb576 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -516,11 +516,20 @@ void CSQC_UpdateView(float w, float h) if(cvar("hud_postprocessing")) { - if(cvar("hud_contents_blur")) + if(cvar("hud_contents_liquid_blur")) { + // when inside the stomach, we use different blur settings than when we're inside other fluids content_blurpostprocess_x = 1; - content_blurpostprocess_y = contentavgalpha * cvar("hud_contents_blur"); - content_blurpostprocess_z = contentavgalpha * cvar("hud_contents_blur_alpha"); + if(getstati(STAT_VORE_EATEN)) + { + content_blurpostprocess_y = contentavgalpha * cvar("hud_contents_stomach_blur"); + content_blurpostprocess_z = contentavgalpha * cvar("hud_contents_stomach_blur_alpha"); + } + else + { + content_blurpostprocess_y = contentavgalpha * cvar("hud_contents_liquid_blur"); + content_blurpostprocess_z = contentavgalpha * cvar("hud_contents_liquid_blur_alpha"); + } } else {