seta hud_damage_pain_threshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"\r
seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"\r
\r
-seta hud_stomach 0.3 "displays a splash on the screen when inside the stomach, value specifies alpha"\r
+seta hud_stomach 0.5 "displays a splash on the screen when inside the stomach, value specifies alpha"\r
seta hud_stomach_color "0.5 1 0" "color of the stomach screen splash"\r
+seta hud_stomach_fade_in 0.1 "how quickly the stomach splash appears when you get swallowed"\r
+seta hud_stomach_fade_out 0.025 "how quickly the stomach splash disappears when you are regurgitated"\r
\r
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"\r
seta hud_postprocessing_maxbluralpha 0.5 "maximum alpha which the blur postprocess can be"\r
float pickup_crosshair_time, pickup_crosshair_size;\r
float myhealth, myhealth_prev, myhealth_flash;\r
float contentavgalpha, liquidalpha_prev;\r
+float stomachsplash_alpha;\r
vector myhealth_gentlergb;\r
vector liquidcolor_prev;\r
vector damage_blurpostprocess, content_blurpostprocess;\r
}\r
\r
if(cvar("hud_stomach"))\r
- if(getstati(STAT_VORE_EATEN))\r
- drawpic('0 0 0', "gfx/blood", '1 0 0' * vid_conwidth + '0 1 0' * vid_conheight, stov(cvar_string("hud_stomach_color")), cvar("hud_stomach"), DRAWFLAG_NORMAL);\r
+ {\r
+ if(getstati(STAT_VORE_EATEN))\r
+ {\r
+ if(stomachsplash_alpha < cvar("hud_stomach"))\r
+ stomachsplash_alpha += cvar("hud_stomach_fade_in") * frametime;\r
+ else\r
+ stomachsplash_alpha = cvar("hud_stomach");\r
+ }\r
+ else\r
+ {\r
+ if(stomachsplash_alpha > 0)\r
+ stomachsplash_alpha -= cvar("hud_stomach_fade_out") * frametime;\r
+ else\r
+ stomachsplash_alpha = 0;\r
+ }\r
+ stomachsplash_alpha = bound(0, stomachsplash_alpha, 1);\r
+ drawpic('0 0 0', "gfx/blood", '1 0 0' * vid_conwidth + '0 1 0' * vid_conheight, stov(cvar_string("hud_stomach_color")), stomachsplash_alpha, DRAWFLAG_NORMAL);\r
+ }\r
\r
if(cvar("hud_postprocessing"))\r
{ // lets apply the postprocess effects from the previous two functions if needed\r