From: MirceaKitsune Date: Mon, 11 Jul 2011 20:21:02 +0000 (+0300) Subject: Deal some damage (very little) to predators who are regurgitating. After all, it... X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=33cadbbb8f73df89497d7a760311f390c058d625 Deal some damage (very little) to predators who are regurgitating. After all, it's not a pleasant thing that doesn't affect your health at all, in reality :P --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index 4f4c8b69..20b9a133 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -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" 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" set g_balance_vore_swallow_punchangle 12 "your view gets tilted by this amount when swallowing someone" +set g_balance_vore_regurgitate_damage 3 "Predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)" set g_balance_vore_regurgitate_speedcap 1200 "when a predator is going faster than this, their prey is squeezed out of them" 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)" set g_balance_vore_regurgitate_force 600 "regurgitated players rocket out at this speed, in the direction the predator is facing" diff --git a/data/qcsrc/common/constants.qh b/data/qcsrc/common/constants.qh index 250052d3..65f48568 100644 --- a/data/qcsrc/common/constants.qh +++ b/data/qcsrc/common/constants.qh @@ -435,7 +435,8 @@ float DEATH_FIRE = 10017; float DEATH_TURRET = 10020; float DEATH_QUIET = 10021; float DEATH_DIGESTION = 10022; -float DEATH_STOMACHKICK = 10023; +float DEATH_REGURGITATION = 10023; +float DEATH_STOMACHKICK = 10024; float DEATH_SBMINIGUN = 10030; float DEATH_SBROCKET = 10031; diff --git a/data/qcsrc/server/g_damage.qc b/data/qcsrc/server/g_damage.qc index f3f342ca..5eaf07b2 100644 --- a/data/qcsrc/server/g_damage.qc +++ b/data/qcsrc/server/g_damage.qc @@ -293,6 +293,8 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) bprint ("^1",s, "^1 burned to death\n"); else if (deathtype == DEATH_DIGESTION) bprint ("^1",s, "^1 was digested\n"); + else if (deathtype == DEATH_REGURGITATION) + bprint ("^1",s, "^1 regurgitated to death\n"); else if (deathtype == DEATH_STOMACHKICK) bprint ("^1",s, "^1 was ripped apart from the inside\n"); else if (deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET) @@ -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"); else if (deathtype == DEATH_DIGESTION) bprint ("^1",s, "^1 was digested by ^1", a, "\n"); + else if (deathtype == DEATH_REGURGITATION) + bprint ("^1",s, "^1 regurgitated to death due to ^1", a, "\n"); else if (deathtype == DEATH_STOMACHKICK) bprint ("^1",s, "^1 was ripped apart from the inside by ^1", a, "\n"); else if (deathtype == DEATH_CUSTOM) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 808ca3f9..54887741 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -369,6 +369,16 @@ void Vore_Regurgitate(entity e) Vore_SwallowModel_Update(e, e.predator); } + // apply regurgitation damage to the predator + if(cvar("g_balance_vore_regurgitate_damage")) + { + float regurgitate_dmg; + regurgitate_dmg = cvar("g_balance_vore_regurgitate_damage"); + if(cvar("g_healthsize")) + regurgitate_dmg *= e.scale / e.predator.scale; + Damage(e.predator, e.predator, e.predator, regurgitate_dmg, DEATH_REGURGITATION, e.predator.origin, '0 0 0'); + } + PlayerSound(e.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND); setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating pointparticles(particleeffectnum("regurgitate"), e.predator.origin, '0 0 0', 1);