Require re-pressing the stomach kick key by default
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 9a3d941..531f95d 100644 (file)
@@ -518,11 +518,12 @@ void Vore_Teamheal()
        }\r
 }\r
 \r
        }\r
 }\r
 \r
+.float kick_pressed;\r
 void Vore_StomachKick()\r
 {\r
        // allows prey to kick the predator's stomach and do some damage or attempt to escape\r
 \r
 void Vore_StomachKick()\r
 {\r
        // allows prey to kick the predator's stomach and do some damage or attempt to escape\r
 \r
-       if(time > self.stomachkick_delay)\r
+       if(time > self.stomachkick_delay && !self.kick_pressed)\r
        {\r
                float damage;\r
                vector force;\r
        {\r
                float damage;\r
                vector force;\r
@@ -546,6 +547,8 @@ void Vore_StomachKick()
                        self.predator.regurgitate_prepare = 0;\r
 \r
                self.stomachkick_delay = time + cvar("g_balance_vore_kick_delay");\r
                        self.predator.regurgitate_prepare = 0;\r
 \r
                self.stomachkick_delay = time + cvar("g_balance_vore_kick_delay");\r
+               if(cvar("g_balance_vore_kick_repress"))\r
+                       self.kick_pressed = TRUE;\r
        }\r
 }\r
 \r
        }\r
 }\r
 \r
@@ -847,8 +850,13 @@ void Vore()
                Vore_Teamheal();\r
 \r
        // execute prey commands\r
                Vore_Teamheal();\r
 \r
        // execute prey commands\r
-       if(self.BUTTON_ATCK && cvar("g_vore_kick"))\r
-               Vore_StomachKick();\r
+       if(self.BUTTON_ATCK)\r
+       {\r
+               if(cvar("g_vore_kick"))\r
+                       Vore_StomachKick();\r
+       }\r
+       else\r
+               self.kick_pressed = FALSE;\r
        if(self.BUTTON_JUMP)\r
                Vore_StomachLeave();\r
 \r
        if(self.BUTTON_JUMP)\r
                Vore_StomachLeave();\r
 \r