From 7c1d1087abc6f14b6ff605be2cd007d749a3cdd0 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 19 Nov 2011 14:07:09 +0200 Subject: [PATCH] Consumable item effects for swallowing and regurgitating, some identical to those for players. Also enable auto-digestion on items --- data/balanceVT.cfg | 2 ++ data/qcsrc/server/t_items.qc | 15 +++++++++++++++ data/qcsrc/server/vore.qc | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index ddce1aca..d92909c2 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -207,6 +207,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_predator_punchangle 12 "your view gets tilted by this amount when swallowing someone" +set g_balance_vore_swallow_predator_punchangle_item 6 "your view gets tilted by this amount when swallowing an item" set g_balance_vore_swallow_prey_punchvector 25 "your view gets lifted by this amount when getting swallowed" set g_balance_vore_regurgitate_damage 10 "predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)" 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)" @@ -214,6 +215,7 @@ set g_balance_vore_regurgitate_force 600 "regurgitated players rocket out at thi set g_balance_vore_regurgitate_predatorforce 450 "players are pushed back by this amount when regurgitating someone, opposite of the direction they are facing" set g_balance_vore_regurgitate_delay 0.5 "regurgitation delay" set g_balance_vore_regurgitate_predator_punchangle 12 "your view gets tilted by this amount when regurgitating someone" +set g_balance_vore_regurgitate_predator_punchangle_item 6 "your view gets tilted by this amount when regurgitating an item" set g_balance_vore_regurgitate_prey_punchvector 50 "your view gets lowered by this amount when getting regurgitated" set g_balance_vore_digestion_damage 4 "amount of damage applied to victims during digestion" set g_balance_vore_digestion_damage_death 2 "amplify digestion damage by this amount when the prey is dead" diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 5bf6a540..2ea388a3 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -248,6 +248,14 @@ float Item_Consumable_Customizeentityforclient() void Item_Consumable_Remove() { + // predator effects, some common to those in Vore_Regurgitate + PlayerSound(self.predator, playersound_regurgitate, CHAN_VOICE, VOICETYPE_PLAYERSOUND); + setanim(self.predator, self.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating + pointparticles(particleeffectnum("vore_regurgitate"), self.predator.origin, '0 0 0', 1); + self.predator.punchangle_x += cvar("g_balance_vore_regurgitate_predator_punchangle_item"); + self.predator.regurgitate_prepare = 0; + self.predator.action_delay = time + cvar("g_balance_vore_action_delay"); + self.nextthink = 0; remove(self); self = world; @@ -275,6 +283,13 @@ void Item_Consumable_Spawn(entity e, entity pl) item.customizeentityforclient = Item_Consumable_Customizeentityforclient; item.think = Item_Consumable_Think; item.nextthink = time; + + // predator effects, some common to those in Vore_Swallow + PlayerSound(e.predator, playersound_swallow, CHAN_VOICE, VOICETYPE_PLAYERSOUND); + setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating + e.predator.punchangle_x -= cvar("g_balance_vore_swallow_predator_punchangle_item"); + e.predator.regurgitate_prepare = 0; + Vore_AutoDigest(e.predator); } float Item_GiveTo(entity item, entity player) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 379385e8..aac9eda2 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -195,7 +195,7 @@ void Vore_AutoDigest(entity e) return; if(!e.cvar_cl_vore_autodigest || clienttype(e) != CLIENTTYPE_REAL) return; // this feature is only for players, not bots - if(e.stomach_load > 1) + if(e.stomach_load) return; // don't start digestion if we already ate someone, as that means we manually disabled it after the first prey and want it off if(Stomach_TeamMates_check(e)) return; // never begin automatic digestion if we've swallowed a team mate -- 2.39.2