\r
// if a predator is taking damage, check if he should regurgitate his prey, based on the damage he took\r
if(cvar("g_balance_vore_escapeprobability"))\r
- {\r
- entity e;\r
- FOR_EACH_PLAYER(e)\r
- {\r
- if(e.predator != world && e.predator == targ)\r
- if(random() < cvar("g_balance_vore_escapeprobability") * damage)\r
- Vore_Regurgitate(e);\r
- }\r
- }\r
+ if(targ.stomach_load && random() < cvar("g_balance_vore_escapeprobability") * damage)\r
+ targ.regurgitate_prepare = -1;\r
\r
// nullify damage if teamplay is on\r
if(deathtype != DEATH_TELEFRAG)\r
-.float regurgitate_prepare;\r
.float stomachkick_delay, system_delay, action_delay, digest_button_delay_time, regurgitate_button_delay_time;\r
.float complain_vore;\r
.float vore_oldmovetype, vore_oldsolid;\r
}\r
}\r
\r
+ if(self.stomach_load > self.stomach_maxload) // the predator got beyond his capacity after eating, so some prey must pop out\r
+ {\r
+ self.regurgitate_prepare = -1;\r
+ return;\r
+ }\r
+ if(cvar("g_balance_vore_load_pred_speedcap") && self.stomach_load && vlen(self.velocity) >= cvar("g_balance_vore_load_pred_speedcap") / (self.stomach_load / self.stomach_maxload)) // predator's going too fast, gets sick and throws up\r
+ {\r
+ self.regurgitate_prepare = -1;\r
+ return;\r
+ }\r
+\r
if(cvar("g_vore_gurglesound"))\r
Vore_GurgleSound();\r
\r
self.predator.regurgitate_prepare = 0;\r
}\r
\r
- if(self.predator.stomach_load > self.predator.stomach_maxload) // the predator got beyond his capacity after eating, so some prey must pop out\r
- {\r
- Vore_Regurgitate(self);\r
- return;\r
- }\r
- if(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.predator.velocity) >= cvar("g_balance_vore_load_pred_speedcap") / (self.predator.stomach_load / self.predator.stomach_maxload)) // predator's going too fast, gets sick and throws up\r
- {\r
- Vore_Regurgitate(self);\r
- return;\r
- }\r
-\r
// apply delayed regurgitating if it was scheduled\r
if(self.predator.regurgitate_prepare && time > self.predator.regurgitate_prepare)\r
{\r
void Vore();\r
-void Vore_Regurgitate(entity e);\r
void Vore_Disconnect();\r
+.float regurgitate_prepare;\r
\r
entity Swallow_player_check();\r
float Swallow_condition_check(entity prey);\r