From aa047554264f07ff5f56e28af30bc18159904ea5 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 7 Jul 2011 14:19:38 +0300 Subject: [PATCH] Base regurgitation probability on the amount of damage dealt to the predator. eg: Hitting a predator with the Grabber alt fire has a higher chance of him throwing up his prey, over a stomach kick done by his prey, as it deals more damage. --- data/balanceVT.cfg | 2 +- data/qcsrc/server/g_damage.qc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index 29c0a5a7..c7d5f57e 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -209,5 +209,5 @@ set g_balance_vore_kick_delay 0.6 "how many seconds must pass before you can per set g_balance_vore_kick_force 140 "predators are pushed by this amount when stomach kicked, in the direction their prey is facing" set g_balance_vore_kick_predator_punchangle 3 "your view gets tilted by this amount when receiving stomach kicks" set g_balance_vore_kick_prey_punchangle 6 "your view gets tilted by this amount when dealing stomach kicks" -set g_balance_vore_escapeprobability 0.115 "probability of getting regurgitated when the predator takes damage (0 = never, 1 = always)" +set g_balance_vore_escapeprobability 0.005 "probability of getting regurgitated when the predator takes damage, based on the amount of damage dealt (0 = never, 1 = always)" // }}} diff --git a/data/qcsrc/server/g_damage.qc b/data/qcsrc/server/g_damage.qc index 35eb1f55..f3f342ca 100644 --- a/data/qcsrc/server/g_damage.qc +++ b/data/qcsrc/server/g_damage.qc @@ -693,14 +693,14 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if (attacker.isbot) damage = damage * bound(0.1, (skill + 5) * 0.1, 1); - // if a predator is taking damage, check if he should regurgitate any prey + // if a predator is taking damage, check if he should regurgitate his prey, based on the damage he took if(cvar("g_balance_vore_escapeprobability")) { entity e; FOR_EACH_PLAYER(e) { if(e.predator == targ) - if(random() < cvar("g_balance_vore_escapeprobability")) + if(random() < cvar("g_balance_vore_escapeprobability") * damage) Vore_Regurgitate(e); } } -- 2.39.2