From 59f1d90684ab3baf9f2d73fb7c4132ccac825717 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Fri, 10 Sep 2010 01:42:23 +0300 Subject: [PATCH] Add a cvar that can disable vore between team mates. Not sure why anyone would want this, but I like cvaring stuff :) --- data/defaultVoretournament.cfg | 7 ++++--- data/qcsrc/server/bot/havocbot/vore_ai.qc | 2 +- data/qcsrc/server/vore.qc | 12 ++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index e20b8330..fb4220a7 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -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" set cl_vore_cameraspeed 1.5 "speed at which you see yourself sliding down when swallowed, 0 disables" set cl_vore_punchangle 10 "your view gets tilted by this amount when swallowing or regurgitating someone" -set g_vore_regurgitatecolor_release "0.875 1 0.375" "the color players will have when regurgitated alive" -set g_vore_regurgitatecolor_digest "0.125 0.25 0" "the color players will have when digested" -set g_vore_gurglesound 1 "predators make an ambient gurgling sound" +set g_vore_teamvore 1 "allow players to swallow their team mates" set g_vore_biggergut 1 "when enabled, a player can't swallow someone with more players in their stomach than them" 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" +set g_vore_gurglesound 1 "predators make an ambient gurgling sound" 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)" +set g_vore_regurgitatecolor_release "0.875 1 0.375" "the color players will have when regurgitated alive" +set g_vore_regurgitatecolor_digest "0.125 0.25 0" "the color players will have when digested" set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file" set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file" diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index dddabf78..6e95c6fe 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -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 { diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 1c8b2d05..19fcb2b2 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -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 if not(vlen(self.velocity) > cvar("g_balance_vore_regurgitate_speedcap")) { + if(teams_matter && prey.team == self.team && !cvar("g_vore_teamvore")) + { + if(time > self.complain_vore) + { + play2(self, "weapons/unavailable.wav"); + sprint(self, "You cannot swallow your team mates\n"); + self.complain_vore = time + complain_delay_time; + } + return FALSE; + } + if(self.stomach_load >= cvar("g_balance_vore_swallow_limit")) { if(time > self.complain_vore) @@ -438,6 +449,7 @@ void Vore() if(self.predator.digesting == TRUE) Vore_Digest(); if(teams_matter && self.team == self.predator.team) + if(cvar("g_balance_vore_teamheal") && cvar("g_vore_teamvore")) Vore_Teamheal(); // execute prey commands -- 2.39.2