set g_balance_vore_kick_damage_max 30 "maximum amount of damage you can do with a stomach kick"\r
set g_balance_vore_kick_delay 0.6 "how many seconds must pass before you can perform another stomach kick"\r
set g_balance_vore_kick_force 140 "predators are pushed by this amount when stomach kicked, in the direction their prey is facing"\r
-set g_balance_vore_kick_escapeprobability 0.115 "probability of getting regurgitated while performing stomach kicks (0 = never, 1 = always)"\r
set g_balance_vore_kick_predator_punchangle 3 "your view gets tilted by this amount when receiving stomach kicks"\r
set g_balance_vore_kick_prey_punchangle 6 "your view gets tilted by this amount when dealing stomach kicks"\r
+set g_balance_vore_escapeprobability 0.115 "probability of getting regurgitated when the predator takes damage (0 = never, 1 = always)"\r
// }}}\r
if (attacker.isbot)\r
damage = damage * bound(0.1, (skill + 5) * 0.1, 1);\r
\r
+ // if a predator is taking damage, check if he should regurgitate any prey\r
+ if(cvar("g_balance_vore_escapeprobability"))\r
+ {\r
+ entity e;\r
+ FOR_EACH_PLAYER(e)\r
+ {\r
+ if(e.predator == targ)\r
+ if(random() < cvar("g_balance_vore_escapeprobability"))\r
+ Vore_Regurgitate(e);\r
+ }\r
+ }\r
+\r
// nullify damage if teamplay is on\r
if(deathtype != DEATH_TELEFRAG)\r
if(attacker.classname == "player")\r
self.predator.punchangle_x -= cvar("g_balance_vore_kick_predator_punchangle");\r
self.punchangle_x += cvar("g_balance_vore_kick_prey_punchangle");\r
\r
- if(random() < cvar("g_balance_vore_kick_escapeprobability"))\r
- Vore_Regurgitate(self);\r
-\r
self.stomachkick_delay = time + cvar("g_balance_vore_kick_delay");\r
}\r
}\r
void Vore();\r
+void Vore_Regurgitate(entity e);\r
void Vore_Disconnect();\r
void Vore_DeadPrey_Detach(entity e);\r
\r