From 19f1cf5f335ce14e53bd00d31c51b2ee9052c352 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 15 Mar 2012 22:25:32 +0200 Subject: [PATCH] Fix my last commit --- data/balanceVT.cfg | 4 ++-- data/qcsrc/server/t_items.qc | 12 ++++++------ data/qcsrc/server/vore.qc | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index 08f66d50..061ba8f8 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -210,7 +210,7 @@ set g_balance_vore_swallow_speed_cutspd_pred 0.5 "predator movement slows down b set g_balance_vore_swallow_speed 1 "how long it takes to swallow a player" 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 10 "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_predator_punchangle_item 8 "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)" @@ -219,7 +219,7 @@ set g_balance_vore_regurgitate_predatorforce 450 "players are pushed back by thi set g_balance_vore_regurgitate_delay 0.5 "regurgitation delay" set g_balance_vore_regurgitate_death_silent 0 "when dead prey is digested to the maximum amount, remove them silently rather than throwing up the gibs" set g_balance_vore_regurgitate_predator_punchangle 10 "your view gets tilted by this amount when regurgitating someone" -set g_balance_vore_regurgitate_predator_punchangle_item 4 "your view gets tilted by this amount when regurgitating an item" +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 3 "amount of damage applied to victims during digestion" set g_balance_vore_digestion_damage_death 4.5 "amount of damage applied to dead victims during digestion" diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index cb11ff0f..fde51ba8 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -293,7 +293,7 @@ void Item_Consumable_Remove(entity e, float regurgitate) if(regurgitate) { float scalediff, sz; - sz = e.scale; // the line below does not work if I define this directly (fteqcc bug?) + sz = e.scale ? e.scale : 1; // the line below does not work if I define this directly (fteqcc bug?) scalediff = cvar("g_healthsize") ? sz / e.predator.scale : sz; // the tighter the gut, the greater the velocity // predator effects, some common to those in Vore_Regurgitate @@ -318,10 +318,6 @@ void Item_Consumable_Spawn(entity e, entity pl) { entity item; - float scalediff, sz; - sz = e.scale; // the line below does not work if I define this directly (fteqcc bug?) - scalediff = cvar("g_healthsize") ? sz / e.predator.scale : sz; // the tighter the gut, the greater the velocity - item = spawn(); item.owner = e; item.classname = "consumable"; @@ -355,6 +351,10 @@ void Item_Consumable_Spawn(entity e, entity pl) if(stov(cvar_string("g_vore_regurgitatecolor_color_normal"))) item.colormod = stov(cvar_string("g_vore_regurgitatecolor_color_normal")); + float scalediff, sz; + sz = e.scale ? e.scale : 1; // the line below does not work if I define this directly (fteqcc bug?) + scalediff = cvar("g_healthsize") ? sz / pl.scale : sz; // the tighter the gut, the greater the velocity + // predator effects, some common to those in Vore_Swallow PlayerSound(pl, playersound_swallow, CHAN_VOICE, VOICETYPE_PLAYERSOUND); setanim(pl, pl.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating @@ -400,7 +400,7 @@ void Item_DroppedConsumable_Spawn(entity e) item.effects |= EF_NODEPTHTEST; float scalediff, sz; - sz = e.scale; // the line below does not work if I define this directly (fteqcc bug?) + sz = e.scale ? e.scale : 1; // the line below does not work if I define this directly (fteqcc bug?) scalediff = cvar("g_healthsize") ? sz / e.predator.scale : sz; // the tighter the gut, the greater the velocity setorigin(item, e.predator.origin); diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index cd264c5b..f88b245b 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -290,9 +290,6 @@ void Vore_Swallow(entity e) { // this player is being swallowed by another player, apply the proper changes - float scalediff; - scalediff = cvar("g_healthsize") ? e.scale / e.predator.scale : 1; // the tighter the gut, the greater the effect - e.vore_oldmovetype = e.movetype; e.vore_oldsolid = e.solid; e.punchvector_z = cvar("g_balance_vore_swallow_prey_punchvector"); @@ -304,6 +301,9 @@ void Vore_Swallow(entity e) e.solid = SOLID_NOT; e.aiment = e.predator; // follow the predator, automatically unset when regurgitated + float scalediff; + scalediff = cvar("g_healthsize") ? e.scale / e.predator.scale : 1; // the tighter the gut, the greater the effect + // drop keys (KH) and flags (CTF) when we get swallowed kh_Key_DropAll(e, FALSE); if(e.flagcarried) @@ -377,9 +377,6 @@ void Vore_Regurgitate(entity e) { // this player is being regurgitated by their predator, apply the proper changes - float scalediff; - scalediff = cvar("g_healthsize") ? e.scale / e.predator.scale : 1; // the tighter the gut, the greater the effect - e.movetype = e.vore_oldmovetype; if(e.health > 0) // leave SOLID_NOT for dead bodies e.solid = e.vore_oldsolid; @@ -395,6 +392,9 @@ void Vore_Regurgitate(entity e) return; } + float scalediff; + scalediff = cvar("g_healthsize") ? e.scale / e.predator.scale : 1; // the tighter the gut, the greater the effect + // apply velocities makevectors(e.predator.v_angle); e.velocity = v_forward * cvar("g_balance_vore_regurgitate_force") * scalediff; -- 2.39.2