// {{{ stomach\r
set g_balance_vore_swallow_range 100 "distance below which you can swallow another player when facing them"\r
set g_balance_vore_swallow_limit 3 "how many players can fit in the stomach at a time, may range between 1 and 9"\r
+set g_balance_vore_swallow_speed 1 "how long it takes to swallow a player"\r
set g_balance_vore_swallow_stealprey 0.7 "probability of stealing someone's prey when eating them (when true their prey joins your stomach rather than popping out). 0 = never, 1 = always"\r
set g_balance_vore_swallow_dropweapon 0.6 "probability of dropping your weapon when swallowed. 0 = never and 1 = always, does not apply to team mates"\r
set g_balance_vore_swallow_punchangle 12 "your view gets tilted by this amount when swallowing someone"\r
e.stomachkick_delay = time + cvar("g_balance_vore_kick_delay"); // don't kick immediately after being swallowed\r
}\r
\r
+void Vore_SwallowStep(entity e)\r
+{\r
+ if(!cvar("g_balance_vore_swallow_speed"))\r
+ {\r
+ Vore_Swallow(e);\r
+ return;\r
+ }\r
+\r
+ // increase the progress value until it reaches 1, then swallow the player\r
+ if(e.swallow_progress_prey < 1)\r
+ e.swallow_progress_prey += cvar("g_balance_vore_swallow_speed") * frametime;\r
+ else\r
+ {\r
+ Vore_Swallow(e);\r
+ e.swallow_progress_prey = 0;\r
+ }\r
+\r
+ // the predator's progress is how much the prey got swallowed\r
+ self.swallow_progress_pred = e.swallow_progress_prey;\r
+}\r
+\r
void Vore_Regurgitate(entity e)\r
{\r
// this player is being regurgitated by their predator, apply the proper changes\r
self.stat_canswallow = 1;\r
\r
if(self.BUTTON_ATCK)\r
- Vore_Swallow(prey);\r
+ Vore_SwallowStep(prey);\r
}\r
else if(prey != world)\r
self.stat_canswallow = -1;\r