]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Stomach leaving feature (alt fire button for prey). Allows prey to get out o their...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 7 Sep 2010 17:19:49 +0000 (20:19 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 7 Sep 2010 17:19:49 +0000 (20:19 +0300)
Todo & known bugs.txt
data/qcsrc/server/vore.qc

index 928dc4b1853774b41e1fd2696020f8975830f52a..4b51bf6b75f2e892bee09dd06be65f06172bfc56 100644 (file)
@@ -6,9 +6,7 @@ Todo:
 \r
 - 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\r
 \r
-- Allow an item respawn time of -1 (never respawn again)\r
-\r
-- Alt fire button can be used to get out of the belly of someone who lets you out (eg. a team mate)\r
+- Allow an item respawn time of -1 (never respawn again). Useful for RPG and Single Player maps\r
 \r
 Known bugs:\r
 \r
index fbc630ffdb0b5719d6099ee95eaee224cf8f7094..10b486ba34ef3c9f09b15287a92b2282bb808b7e 100644 (file)
@@ -260,6 +260,23 @@ void Vore_StomachKick()
        }\r
 }\r
 \r
+void Vore_StomachLeave()\r
+{\r
+       // allows players to get out of their predator at will in some circumstances, such as team mates\r
+\r
+       float canleave;\r
+       canleave = (teams_matter && self.team == self.eater.team); // currently, the only circumstance where you can use this if for team mates\r
+\r
+       if(canleave)\r
+               Vore_Regurgitate(self);\r
+       else if(time > self.complain_swallow)\r
+       {\r
+               play2(self, "weapons/unavailable.wav");\r
+               sprint(self, strcat("You may not willingly get out of ", self.eater.netname, "\n"));\r
+               self.complain_swallow = time + complain_delay;\r
+       }\r
+}\r
+\r
 .float gurglesound_finished, gurglesound_oldstomachload;\r
 void Vore_Gurglesound()\r
 {\r
@@ -397,6 +414,8 @@ void Vore()
 \r
        if(self.BUTTON_ATCK)\r
                Vore_StomachKick();\r
+       else if(self.BUTTON_ATCK2)\r
+               Vore_StomachLeave();\r
 \r
        Vore_CameraEffect_Apply();\r
 }
\ No newline at end of file