]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Wash stomach fluids faster off players that are underwater
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 13:36:32 +0000 (16:36 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 13:36:32 +0000 (16:36 +0300)
data/qcsrc/server/vore.qc

index 6c03c29774153b675d1dab57e95a9c659136e1cf..d043c041ec02871053f457508dd66ec30652c6a9 100644 (file)
@@ -673,17 +673,21 @@ void Vore()
        if(self.colormod)\r
        if(self.colormod != '1 1 1')\r
        {\r
-               // wash the goo away from players once they leave the stomach\r
+               // slowly wash stomach fluids off players once they're out of the stomach\r
                if(cvar("g_vore_regurgitatecolor_fade"))\r
                if(self.deadflag == DEAD_NO) // not for dead bodies\r
                {\r
-                       self.colormod_x += cvar("g_vore_regurgitatecolor_fade") * frametime;\r
+                       float goo_fade;\r
+                       goo_fade = cvar("g_vore_regurgitatecolor_fade") * frametime;\r
+                       goo_fade *= 1 + self.waterlevel; // fade faster when underwater\r
+\r
+                       self.colormod_x += goo_fade;\r
                        if(self.colormod_x > 1)\r
                                self.colormod_x = 1;\r
-                       self.colormod_y += cvar("g_vore_regurgitatecolor_fade") * frametime;\r
+                       self.colormod_y += goo_fade;\r
                        if(self.colormod_y > 1)\r
                                self.colormod_y = 1;\r
-                       self.colormod_z += cvar("g_vore_regurgitatecolor_fade") * frametime;\r
+                       self.colormod_z += goo_fade;\r
                        if(self.colormod_z > 1)\r
                                self.colormod_z = 1;\r
                }\r