]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Deal some damage (very little) to predators who are regurgitating. After all, it...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 20:21:02 +0000 (23:21 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 20:21:02 +0000 (23:21 +0300)
data/balanceVT.cfg
data/qcsrc/common/constants.qh
data/qcsrc/server/g_damage.qc
data/qcsrc/server/vore.qc

index 4f4c8b69cd3448e00ab87798810dadbe488b9cef..20b9a1331af8e72e8a938d36f20ec6c991cb3ff6 100644 (file)
@@ -196,6 +196,7 @@ set g_balance_vore_swallow_speed 1 "how long it takes to swallow a player"
 set g_balance_vore_swallow_stealprey 0.7 "probability of stealing someone's prey when eating them (when true their prey joins your stomach rather than popping out). 0 = never, 1 = always"\r
 set g_balance_vore_swallow_dropweapon 0.6 "probability of dropping your weapon when swallowed. 0 = never and 1 = always, does not apply to team mates"\r
 set g_balance_vore_swallow_punchangle 12 "your view gets tilted by this amount when swallowing someone"\r
+set g_balance_vore_regurgitate_damage 3 "Predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)"\r
 set g_balance_vore_regurgitate_speedcap 1200 "when a predator is going faster than this, their prey is squeezed out of them"\r
 set g_balance_vore_regurgitate_swallowprogress 0.5 "regurgitated prey is given this amount of swallow progress, to simulate being more vulnerable (if slow swallowing is enabled)"\r
 set g_balance_vore_regurgitate_force 600 "regurgitated players rocket out at this speed, in the direction the predator is facing"\r
index 250052d324a5e28d05f3fdff8a7fe29a57205ea8..65f48568339e918c7c921ca32b9987012acc79bc 100644 (file)
@@ -435,7 +435,8 @@ float DEATH_FIRE = 10017;
 float DEATH_TURRET = 10020;\r
 float DEATH_QUIET = 10021;\r
 float DEATH_DIGESTION = 10022;\r
-float DEATH_STOMACHKICK = 10023;\r
+float DEATH_REGURGITATION = 10023;\r
+float DEATH_STOMACHKICK = 10024;\r
 \r
 float DEATH_SBMINIGUN = 10030;\r
 float DEATH_SBROCKET  = 10031;\r
index f3f342cae891df825fb7a69e2ea184a3418ac4a3..5eaf07b2cfd5eadced1f054b77f82c196b068e03 100644 (file)
@@ -293,6 +293,8 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        bprint ("^1",s, "^1 burned to death\n");\r
                                else if (deathtype == DEATH_DIGESTION)\r
                                        bprint ("^1",s, "^1 was digested\n");\r
+                               else if (deathtype == DEATH_REGURGITATION)\r
+                                       bprint ("^1",s, "^1 regurgitated to death\n");\r
                                else if (deathtype == DEATH_STOMACHKICK)\r
                                        bprint ("^1",s, "^1 was ripped apart from the inside\n");\r
                                else if (deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)\r
@@ -463,6 +465,8 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                bprint ("^1",s, "^1 was burnt to death by ^1", a, "\n");\r
                                        else if (deathtype == DEATH_DIGESTION)\r
                                                bprint ("^1",s, "^1 was digested by ^1", a, "\n");\r
+                                       else if (deathtype == DEATH_REGURGITATION)\r
+                                               bprint ("^1",s, "^1 regurgitated to death due to ^1", a, "\n");\r
                                        else if (deathtype == DEATH_STOMACHKICK)\r
                                                bprint ("^1",s, "^1 was ripped apart from the inside by ^1", a, "\n");\r
                                        else if (deathtype == DEATH_CUSTOM)\r
index 808ca3f9704b2dc71c42c4685b20cca699cf98a1..548877415c9a1d05aa5405e04c5f30c4c8602591 100644 (file)
@@ -369,6 +369,16 @@ void Vore_Regurgitate(entity e)
                Vore_SwallowModel_Update(e, e.predator);\r
        }\r
 \r
+       // apply regurgitation damage to the predator\r
+       if(cvar("g_balance_vore_regurgitate_damage"))\r
+       {\r
+               float regurgitate_dmg;\r
+               regurgitate_dmg = cvar("g_balance_vore_regurgitate_damage");\r
+               if(cvar("g_healthsize"))\r
+                       regurgitate_dmg *= e.scale / e.predator.scale;\r
+               Damage(e.predator, e.predator, e.predator, regurgitate_dmg, DEATH_REGURGITATION, e.predator.origin, '0 0 0');\r
+       }\r
+\r
        PlayerSound(e.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
        setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
        pointparticles(particleeffectnum("regurgitate"), e.predator.origin, '0 0 0', 1);\r