From: MirceaKitsune Date: Mon, 18 Apr 2011 16:00:44 +0000 (+0300) Subject: Don't allow players with spawn shields active to be swallowed X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=583fe99c237ecc775acb81eb571963a59bc97491;p=voretournament%2Fvoretournament.git Don't allow players with spawn shields active to be swallowed --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 3966b9b8..e11b69eb 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1530,6 +1530,7 @@ seta cl_vore_autodigest 0 "when enabled, the player will automatically begin dig set g_vore 1 "enables the vore system, you want this on!" set g_vore_digestion 1 "enables digestion system, you want this on!" set g_vore_kick 1 "enables stomach kick system, you want this on!" +set g_vore_spawnshield 0 "when disabled, players with spawn shields cannot be swallowed" set g_vore_reversescoring 0 "reverses vore scoring, and gives digested prey a frag rather than the predator (offer yourself gameplay), does not affect suicides, weapon kills and team kills" 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" diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 6fa15248..2bf92919 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -67,6 +67,18 @@ float Swallow_condition_check(entity prey) return FALSE; } + if(!cvar("g_vore_spawnshield")) + if(prey.spawnshieldtime > time) + { + if(time > self.complain_vore && self.BUTTON_ATCK) + { + play2(self, "misc/forbidden.wav"); + sprint(self, "You cannot swallow someone protected by the spawn shield\n"); + self.complain_vore = time + complain_delay_time; + } + return FALSE; + } + return TRUE; } return FALSE;