]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
I think Jump is a more appropriate key for getting out than Alt Fire. Also don't...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 48ea0c6e8d63ddf3a3a042967f39c5bc44e4a1f1..102ce98b43a16b77a921b44533804d5c8b1f8ad8 100644 (file)
@@ -56,6 +56,13 @@ float Swallow_condition_check(entity prey)
        return FALSE;\r
 }\r
 \r
        return FALSE;\r
 }\r
 \r
+float Vore_PreyCanLeave()\r
+{\r
+       if(teams_matter && self.team == self.eater.team)\r
+               return TRUE;\r
+       return FALSE;\r
+}\r
+\r
 // make the camera smoothly lower itself when we get swallowed\r
 // the target we are going for is from normal view offset to half of the view offset (because half is the best positioning of the view for the stomach model)\r
 .float cameraeffect_current, cameraeffect_target;\r
 // make the camera smoothly lower itself when we get swallowed\r
 // the target we are going for is from normal view offset to half of the view offset (because half is the best positioning of the view for the stomach model)\r
 .float cameraeffect_current, cameraeffect_target;\r
@@ -266,10 +273,7 @@ void Vore_StomachLeave()
 {\r
        // allows players to get out of their predator at will in some circumstances, such as team mates\r
 \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
+       if(Vore_PreyCanLeave())\r
                Vore_Regurgitate(self);\r
        else if(time > self.complain_swallow)\r
        {\r
                Vore_Regurgitate(self);\r
        else if(time > self.complain_swallow)\r
        {\r
@@ -416,8 +420,10 @@ void Vore()
 \r
        if(self.BUTTON_ATCK)\r
                Vore_StomachKick();\r
 \r
        if(self.BUTTON_ATCK)\r
                Vore_StomachKick();\r
-       else if(self.BUTTON_ATCK2)\r
+       else if(self.BUTTON_JUMP)\r
                Vore_StomachLeave();\r
 \r
                Vore_StomachLeave();\r
 \r
+       self.stat_canleave = Vore_PreyCanLeave();\r
+\r
        Vore_CameraEffect_Apply();\r
 }
\ No newline at end of file
        Vore_CameraEffect_Apply();\r
 }
\ No newline at end of file