From: MirceaKitsune Date: Fri, 25 Feb 2011 22:23:55 +0000 (+0200) Subject: Add the screen colorize effect for when in the stomach as well. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9dc70a79e120b75e83356e96c77d4e45994a4277;p=voretournament%2Fvoretournament.git Add the screen colorize effect for when in the stomach as well. --- diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index 7c7616d1..de48ff47 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -1097,6 +1097,8 @@ seta hud_contents_slime_alpha 0.7 "alpha of the slime color blend when inside it seta hud_contents_slime_color "0 0.4 0.1" seta hud_contents_water_alpha 0.5 "alpha of the water color blend when inside it" seta hud_contents_water_color "0.4 0.3 0.3" +seta hud_contents_stomach_alpha 0.2 "alpha of the stomach color blend when inside it" +seta hud_contents_stomach_color "0.3 0.2 0" sbar_info_pos 50 seta sbar_alpha_bg 0.8 "alpha value of the HUD background" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 42fdf05c..c91828e7 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -460,32 +460,41 @@ void CSQC_UpdateView(float w, float h) { float contentalpha_temp, incontent, liquidalpha, contentfadetime; vector liquidcolor; - - switch(pointcontents(view_origin)) + + if (getstati(STAT_VORE_EATEN)) { - case CONTENT_WATER: - liquidalpha = cvar("hud_contents_water_alpha"); - liquidcolor = stov(cvar_string("hud_contents_water_color")); - incontent = 1; - break; - - case CONTENT_LAVA: - liquidalpha = cvar("hud_contents_lava_alpha"); - liquidcolor = stov(cvar_string("hud_contents_lava_color")); - incontent = 1; - break; - - case CONTENT_SLIME: - liquidalpha = cvar("hud_contents_slime_alpha"); - liquidcolor = stov(cvar_string("hud_contents_slime_color")); - incontent = 1; - break; - - default: - liquidalpha = 0; - liquidcolor = '0 0 0'; - incontent = 0; - break; + liquidalpha = cvar("hud_contents_stomach_alpha"); + liquidcolor = stov(cvar_string("hud_contents_stomach_color")); + incontent = 1; + } + else + { + switch(pointcontents(view_origin)) + { + case CONTENT_WATER: + liquidalpha = cvar("hud_contents_water_alpha"); + liquidcolor = stov(cvar_string("hud_contents_water_color")); + incontent = 1; + break; + + case CONTENT_LAVA: + liquidalpha = cvar("hud_contents_lava_alpha"); + liquidcolor = stov(cvar_string("hud_contents_lava_color")); + incontent = 1; + break; + + case CONTENT_SLIME: + liquidalpha = cvar("hud_contents_slime_alpha"); + liquidcolor = stov(cvar_string("hud_contents_slime_color")); + incontent = 1; + break; + + default: + liquidalpha = 0; + liquidcolor = '0 0 0'; + incontent = 0; + break; + } } if(incontent) // fade in/out at different speeds so you can do e.g. instant fade when entering water and slow when leaving it.