float myhealth, myhealth_prev, myhealth_flash;\r
float contentavgalpha, liquidalpha_prev;\r
float stomachsplash_alpha, stomachsplash_remove_at_respawn;\r
+float volume_modify_1, volume_modify_2, volume_modify_default_1, volume_modify_default_2;\r
vector myhealth_gentlergb;\r
vector liquidcolor_prev;\r
vector damage_blurpostprocess, content_blurpostprocess;\r
\r
if(contentavgalpha)\r
drawfill('0 0 0', '1 0 0' * vid_conwidth + '0 1 0' * vid_conheight, liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);\r
+\r
+ if(cvar("hud_postprocessing"))\r
+ {\r
+ if(cvar("hud_contents_liquid_blur"))\r
+ {\r
+ // when inside the stomach, we use different blur settings than when we're inside other fluids\r
+ content_blurpostprocess_x = 1;\r
+ if(getstati(STAT_VORE_EATEN))\r
+ {\r
+ content_blurpostprocess_y = contentavgalpha * cvar("hud_contents_stomach_blur");\r
+ content_blurpostprocess_z = contentavgalpha * cvar("hud_contents_stomach_blur_alpha");\r
+ }\r
+ else\r
+ {\r
+ content_blurpostprocess_y = contentavgalpha * cvar("hud_contents_liquid_blur");\r
+ content_blurpostprocess_z = contentavgalpha * cvar("hud_contents_liquid_blur_alpha");\r
+ }\r
+ }\r
+ else\r
+ {\r
+ content_blurpostprocess_x = 0;\r
+ content_blurpostprocess_y = 0;\r
+ content_blurpostprocess_z = 0;\r
+ }\r
+ }\r
}\r
\r
if(cvar("hud_damage"))\r
cvar_set("r_glsl_postprocess_uservec2_enable", "0");\r
}\r
\r
+ if(cvar("cl_vore_cutvolume_sound") < 1 || cvar("cl_vore_cutvolume_music") < 1)\r
+ {\r
+ float volume_modify_1_target, volume_modify_2_target, volume_modify_fade;\r
+ if(getstati(STAT_VORE_EATEN))\r
+ {\r
+ volume_modify_1_target = volume_modify_default_1 * cvar("cl_vore_cutvolume_sound");\r
+ volume_modify_2_target = volume_modify_default_2 * cvar("cl_vore_cutvolume_music");\r
+ }\r
+ else\r
+ {\r
+ volume_modify_1_target = 1;\r
+ volume_modify_2_target = 1;\r
+ }\r
+ volume_modify_fade = cvar("cl_vore_cutvolume_fade") * frametime;\r
+\r
+ if(spectatee_status == -1 || intermission)\r
+ {\r
+ // no volume fading is currently taking place, so if we change the volume settings, update the initial volume\r
+ volume_modify_default_1 = cvar("volume");\r
+ volume_modify_default_2 = cvar("bgmvolume");\r
+ }\r
+ else if(volume_modify_1 != volume_modify_1_target || volume_modify_2 != volume_modify_2_target)\r
+ {\r
+ if (volume_modify_1 > volume_modify_1_target + volume_modify_fade)\r
+ volume_modify_1 -= volume_modify_fade;\r
+ else if (volume_modify_1 < volume_modify_1_target - volume_modify_fade)\r
+ volume_modify_1 += volume_modify_fade;\r
+ else\r
+ volume_modify_1 = volume_modify_1_target;\r
+\r
+ if (volume_modify_2 > volume_modify_2_target + volume_modify_fade)\r
+ volume_modify_2 -= volume_modify_fade;\r
+ else if (volume_modify_2 < volume_modify_2_target - volume_modify_fade)\r
+ volume_modify_2 += volume_modify_fade;\r
+ else\r
+ volume_modify_2 = volume_modify_1_target;\r
+\r
+ cvar_set("volume", ftos(volume_modify_1));\r
+ cvar_set("bgmvolume", ftos(volume_modify_2));\r
+ // TODO: Setting the "volume" cvar is a bad way to go, and modifies the menu slider! We need a better way\r
+ }\r
+ else if(cvar("volume") != volume_modify_default_1 || cvar("bgmvolume") != volume_modify_default_2)\r
+ {\r
+ // no volume fading is currently taking place, so if we change the volume settings, update the initial volume\r
+ volume_modify_default_1 = cvar("volume");\r
+ volume_modify_default_2 = cvar("bgmvolume");\r
+ }\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