]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Add the screen colorize effect for when in the stomach as well.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 25 Feb 2011 22:23:55 +0000 (00:23 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 25 Feb 2011 22:23:55 +0000 (00:23 +0200)
data/defaultVoretournament.cfg
data/qcsrc/client/View.qc

index 7c7616d15dd2cb1fe3dccae09b2a232a6a4172a7..de48ff47e1dee1f911dcdd715cbfcc71954786dd 100644 (file)
@@ -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"\r
 seta hud_contents_water_alpha 0.5 "alpha of the water color blend when inside it"\r
 seta hud_contents_water_color "0.4 0.3 0.3"\r
+seta hud_contents_stomach_alpha 0.2 "alpha of the stomach color blend when inside it"\r
+seta hud_contents_stomach_color "0.3 0.2 0"\r
 \r
 sbar_info_pos 50\r
 seta sbar_alpha_bg 0.8 "alpha value of the HUD background"\r
index 42fdf05c0c41e68480d4b528dc9b2459dbafb7f5..c91828e7b4cacf7f5fdc1fbc4f271d0441e83214 100644 (file)
@@ -460,32 +460,41 @@ void CSQC_UpdateView(float w, float h)
        {\r
                float contentalpha_temp, incontent, liquidalpha, contentfadetime;\r
                vector liquidcolor;\r
-               \r
-               switch(pointcontents(view_origin))\r
+\r
+               if (getstati(STAT_VORE_EATEN))\r
                {\r
-                       case CONTENT_WATER:\r
-                               liquidalpha = cvar("hud_contents_water_alpha");\r
-                               liquidcolor = stov(cvar_string("hud_contents_water_color"));\r
-                               incontent = 1;\r
-                               break;\r
-                               \r
-                       case CONTENT_LAVA:\r
-                               liquidalpha = cvar("hud_contents_lava_alpha");\r
-                               liquidcolor = stov(cvar_string("hud_contents_lava_color"));\r
-                               incontent = 1;\r
-                               break;  \r
-                                                       \r
-                       case CONTENT_SLIME:\r
-                               liquidalpha = cvar("hud_contents_slime_alpha");\r
-                               liquidcolor = stov(cvar_string("hud_contents_slime_color"));\r
-                               incontent = 1;\r
-                               break;\r
-                               \r
-                       default:\r
-                               liquidalpha = 0;\r
-                               liquidcolor = '0 0 0';\r
-                               incontent = 0;\r
-                               break;\r
+                       liquidalpha = cvar("hud_contents_stomach_alpha");\r
+                       liquidcolor = stov(cvar_string("hud_contents_stomach_color"));\r
+                       incontent = 1;\r
+               }\r
+               else\r
+               {\r
+                       switch(pointcontents(view_origin))\r
+                       {\r
+                               case CONTENT_WATER:\r
+                                       liquidalpha = cvar("hud_contents_water_alpha");\r
+                                       liquidcolor = stov(cvar_string("hud_contents_water_color"));\r
+                                       incontent = 1;\r
+                                       break;\r
+                                       \r
+                               case CONTENT_LAVA:\r
+                                       liquidalpha = cvar("hud_contents_lava_alpha");\r
+                                       liquidcolor = stov(cvar_string("hud_contents_lava_color"));\r
+                                       incontent = 1;\r
+                                       break;  \r
+                                                               \r
+                               case CONTENT_SLIME:\r
+                                       liquidalpha = cvar("hud_contents_slime_alpha");\r
+                                       liquidcolor = stov(cvar_string("hud_contents_slime_color"));\r
+                                       incontent = 1;\r
+                                       break;\r
+                                       \r
+                               default:\r
+                                       liquidalpha = 0;\r
+                                       liquidcolor = '0 0 0';\r
+                                       incontent = 0;\r
+                                       break;\r
+                       }\r
                }\r
                \r
                if(incontent) // fade in/out at different speeds so you can do e.g. instant fade when entering water and slow when leaving it.\r