]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
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 29c0a5a7a37be41e0cc7f4cdab46fdf631264350..c7d5f57e25189e2eb00ae2a6cf23392c503d5973 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_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
 // }}}\r
index 35eb1f551468327c19093bfabc048034d77a9ba9..f3f342cae891df825fb7a69e2ea184a3418ac4a3 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 (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(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
                                        Vore_Regurgitate(e);\r
                        }\r
                }\r