]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Team heal feature. When a player spends time inside a team mate's stomach, they keep...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 5c81ee2a6aa8053ff748f78d11e3b4c43176bf3d..b7e3b6ddf1563f5956f04813b4f6dbe6fc4b55dc 100644 (file)
@@ -163,6 +163,17 @@ void Vore_Digest()
                self.colormod = stov(cvar_string("g_vore_regurgitatecolor_digested"));\r
 }\r
 \r
                self.colormod = stov(cvar_string("g_vore_regurgitatecolor_digested"));\r
 }\r
 \r
+.float teamheal_step;\r
+void Vore_Teamheal()\r
+{\r
+       if(cvar("g_balance_vore_teamheal") && self.health < cvar("g_balance_vore_teamheal_stable"))\r
+       if(time > self.teamheal_step + 0.1)\r
+       {\r
+               self.health += cvar("g_balance_vore_teamheal");\r
+               self.teamheal_step = time;\r
+       }\r
+}\r
+\r
 .float stomachkick_delay;\r
 void Vore_StomachKick()\r
 {\r
 .float stomachkick_delay;\r
 void Vore_StomachKick()\r
 {\r
@@ -288,6 +299,8 @@ void Vore()
 \r
        if(self.eater.digesting == TRUE)\r
                Vore_Digest();\r
 \r
        if(self.eater.digesting == TRUE)\r
                Vore_Digest();\r
+       if(teams_matter && self.team == self.eater.team)\r
+               Vore_Teamheal();\r
 \r
        Vore_StomachKick();\r
 }
\ No newline at end of file
 \r
        Vore_StomachKick();\r
 }
\ No newline at end of file