From: MirceaKitsune Date: Thu, 15 Mar 2012 20:00:20 +0000 (+0200) Subject: Same thing for items X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ea40274ac26af0ed92085850edb104fca354680;p=voretournament%2Fvoretournament.git Same thing for items --- diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 83ec80f4..cb11ff0f 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -292,13 +292,17 @@ 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?) + 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 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("vore_regurgitate"), e.predator.origin, '0 0 0', 1); - e.predator.punchangle_x = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item"); - e.predator.punchangle_y = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item"); - e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item"); + e.predator.punchangle_x = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item") * scalediff; + e.predator.punchangle_y = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item") * scalediff; + e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item") * scalediff; e.predator.regurgitate_prepare = 0; e.predator.action_delay = time + cvar("g_balance_vore_action_delay"); @@ -313,6 +317,11 @@ void Item_Consumable_Remove(entity e, float regurgitate) 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"; @@ -349,9 +358,9 @@ void Item_Consumable_Spawn(entity e, entity pl) // 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 - pl.punchangle_x = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item"); - pl.punchangle_y = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item"); - pl.punchangle_z = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item"); + pl.punchangle_x = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item") * scalediff; + pl.punchangle_y = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item") * scalediff; + pl.punchangle_z = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item") * scalediff; pl.regurgitate_prepare = 0; pl.action_delay = time + cvar("g_balance_vore_action_delay"); }