Base regurgitation probability on the amount of damage dealt to the predator. eg...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 11:19:38 +0000 (14:19 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 11:19:38 +0000 (14:19 +0300)
data/balanceVT.cfg
data/qcsrc/server/g_damage.qc

index 29c0a5a..c7d5f57 100644 (file)
@@ -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"\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
+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)"\r
 // }}}\r
index 35eb1f5..f3f342c 100644 (file)
@@ -693,14 +693,14 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                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 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 == targ)\r
-                               if(random() < cvar("g_balance_vore_escapeprobability"))\r
+                               if(random() < cvar("g_balance_vore_escapeprobability") * damage)\r
                                        Vore_Regurgitate(e);\r
                        }\r
                }\r