From: MirceaKitsune Date: Tue, 7 Sep 2010 17:19:49 +0000 (+0300) Subject: Stomach leaving feature (alt fire button for prey). Allows prey to get out o their... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=75760d292ab245e0ad00b3f2a4bc658d09e835cf;p=voretournament%2Fvoretournament.git Stomach leaving feature (alt fire button for prey). Allows prey to get out o their predator willingly in some circumstances, such as team mates. --- diff --git a/Todo & known bugs.txt b/Todo & known bugs.txt index 928dc4b1..4b51bf6b 100644 --- a/Todo & known bugs.txt +++ b/Todo & known bugs.txt @@ -6,9 +6,7 @@ Todo: - Bots must learn to use the Grabber gun. The weapon code of havocbot is still there, but doesn't know how to shoot the Grabber -- Allow an item respawn time of -1 (never respawn again) - -- Alt fire button can be used to get out of the belly of someone who lets you out (eg. a team mate) +- Allow an item respawn time of -1 (never respawn again). Useful for RPG and Single Player maps Known bugs: diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index fbc630ff..10b486ba 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -260,6 +260,23 @@ void Vore_StomachKick() } } +void Vore_StomachLeave() +{ + // allows players to get out of their predator at will in some circumstances, such as team mates + + float canleave; + canleave = (teams_matter && self.team == self.eater.team); // currently, the only circumstance where you can use this if for team mates + + if(canleave) + Vore_Regurgitate(self); + else if(time > self.complain_swallow) + { + play2(self, "weapons/unavailable.wav"); + sprint(self, strcat("You may not willingly get out of ", self.eater.netname, "\n")); + self.complain_swallow = time + complain_delay; + } +} + .float gurglesound_finished, gurglesound_oldstomachload; void Vore_Gurglesound() { @@ -397,6 +414,8 @@ void Vore() if(self.BUTTON_ATCK) Vore_StomachKick(); + else if(self.BUTTON_ATCK2) + Vore_StomachLeave(); Vore_CameraEffect_Apply(); } \ No newline at end of file