]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Add a cvar that can disable vore between team mates. Not sure why anyone would want...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 9 Sep 2010 22:42:23 +0000 (01:42 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 9 Sep 2010 22:42:23 +0000 (01:42 +0300)
data/defaultVoretournament.cfg
data/qcsrc/server/bot/havocbot/vore_ai.qc
data/qcsrc/server/vore.qc

index e20b833099adcc180b101cb52540dbdc972b17bd..fb4220a744b073cf3602350902b6eb1288c94463 100644 (file)
@@ -1498,12 +1498,13 @@ seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the co
 set cl_vore_stomachmodel 1 "when enabled, we see the stomach model around us when eaten. -1 = disabled, 1 = enabled, anything between 0 and 1 = alpha"\r
 set cl_vore_cameraspeed 1.5 "speed at which you see yourself sliding down when swallowed, 0 disables"\r
 set cl_vore_punchangle 10 "your view gets tilted by this amount when swallowing or regurgitating someone"\r
-set g_vore_regurgitatecolor_release "0.875 1 0.375" "the color players will have when regurgitated alive"\r
-set g_vore_regurgitatecolor_digest "0.125 0.25 0" "the color players will have when digested"\r
-set g_vore_gurglesound 1 "predators make an ambient gurgling sound"\r
+set g_vore_teamvore 1 "allow players to swallow their team mates"\r
 set g_vore_biggergut 1 "when enabled, a player can't swallow someone with more players in their stomach than them"\r
 set g_vore_showhealth 1 "when enabled, a predator can see their prey's health on the stomach board, and prey can see the health of players he's joining in the stomach"\r
+set g_vore_gurglesound 1 "predators make an ambient gurgling sound"\r
 set g_vore_soundocclusion 0.25 "directional player sounds are cut to this amount of their initial volume for eaten players (simulates hearing harder from the stomach)"\r
+set g_vore_regurgitatecolor_release "0.875 1 0.375" "the color players will have when regurgitated alive"\r
+set g_vore_regurgitatecolor_digest "0.125 0.25 0" "the color players will have when digested"\r
 \r
 set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file"\r
 set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file"\r
index dddabf787364cdc60e51a50e0ef6d7d82593c852..6e95c6feb18aa989d439cb47aa95a001ba9f2408 100644 (file)
@@ -18,7 +18,7 @@ void Vore_AI_Teamheal(entity prey)
 
        entity head;
 
-       if not(teams_matter && cvar("g_balance_vore_teamheal"))
+       if not(teams_matter && cvar("g_balance_vore_teamheal") && cvar("g_vore_teamvore"))
                return;
        if(self.deadflag != DEAD_NO || self.predator.classname == "player" || self.flagcarried || self.digesting) // a flag carrier can't waste time on team healing
        {
index 1c8b2d058f7ca659372d806063adf726ac719c38..19fcb2b211c5dad474e16152b7f14afe479be0d3 100644 (file)
@@ -32,6 +32,17 @@ float Swallow_condition_check(entity prey)
        if(self.classname == "player" && self.predator.classname != "player" && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves\r
        if not(vlen(self.velocity) > cvar("g_balance_vore_regurgitate_speedcap"))\r
        {\r
+               if(teams_matter && prey.team == self.team && !cvar("g_vore_teamvore"))\r
+               {\r
+                       if(time > self.complain_vore)\r
+                       {\r
+                               play2(self, "weapons/unavailable.wav");\r
+                               sprint(self, "You cannot swallow your team mates\n");\r
+                               self.complain_vore = time + complain_delay_time;\r
+                       }\r
+                       return FALSE;\r
+               }\r
+\r
                if(self.stomach_load >= cvar("g_balance_vore_swallow_limit"))\r
                {\r
                        if(time > self.complain_vore)\r
@@ -438,6 +449,7 @@ void Vore()
        if(self.predator.digesting == TRUE)\r
                Vore_Digest();\r
        if(teams_matter && self.team == self.predator.team)\r
+       if(cvar("g_balance_vore_teamheal") && cvar("g_vore_teamvore"))\r
                Vore_Teamheal();\r
 \r
        // execute prey commands\r