]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Same thing for items
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 15 Mar 2012 20:00:20 +0000 (22:00 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 15 Mar 2012 20:00:20 +0000 (22:00 +0200)
data/qcsrc/server/t_items.qc

index 83ec80f4704c137863e95387b82d9aeaeaf62f18..cb11ff0ff7d049d309611f2e87ba47cac67b90ec 100644 (file)
@@ -292,13 +292,17 @@ void Item_Consumable_Remove(entity e, float regurgitate)
 {\r
        if(regurgitate)\r
        {\r
+               float scalediff, sz;\r
+               sz = e.scale; // the line below does not work if I define this directly (fteqcc bug?)\r
+               scalediff = cvar("g_healthsize") ? sz / e.predator.scale : sz; // the tighter the gut, the greater the velocity\r
+\r
                // predator effects, some common to those in Vore_Regurgitate\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("vore_regurgitate"), e.predator.origin, '0 0 0', 1);\r
-               e.predator.punchangle_x = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item");\r
-               e.predator.punchangle_y = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item");\r
-               e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item");\r
+               e.predator.punchangle_x = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item") * scalediff;\r
+               e.predator.punchangle_y = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item") * scalediff;\r
+               e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle_item") * scalediff;\r
                e.predator.regurgitate_prepare = 0;\r
                e.predator.action_delay = time + cvar("g_balance_vore_action_delay");\r
 \r
@@ -313,6 +317,11 @@ void Item_Consumable_Remove(entity e, float regurgitate)
 void Item_Consumable_Spawn(entity e, entity pl)\r
 {\r
        entity item;\r
+\r
+       float scalediff, sz;\r
+       sz = e.scale; // the line below does not work if I define this directly (fteqcc bug?)\r
+       scalediff = cvar("g_healthsize") ? sz / e.predator.scale : sz; // the tighter the gut, the greater the velocity\r
+\r
        item = spawn();\r
        item.owner = e;\r
        item.classname = "consumable";\r
@@ -349,9 +358,9 @@ void Item_Consumable_Spawn(entity e, entity pl)
        // predator effects, some common to those in Vore_Swallow\r
        PlayerSound(pl, playersound_swallow, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
        setanim(pl, pl.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r
-       pl.punchangle_x = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item");\r
-       pl.punchangle_y = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item");\r
-       pl.punchangle_z = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item");\r
+       pl.punchangle_x = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item") * scalediff;\r
+       pl.punchangle_y = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item") * scalediff;\r
+       pl.punchangle_z = crandom() * cvar("g_balance_vore_swallow_predator_punchangle_item") * scalediff;\r
        pl.regurgitate_prepare = 0;\r
        pl.action_delay = time + cvar("g_balance_vore_action_delay");\r
 }\r