From 26c6077657b100008384abb48af8b91ff42c9cb9 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 13 Jul 2024 23:32:56 +0200 Subject: [PATCH] Use the proper heal function to heal teammates with the Vampire hook (the global mutator arguments no longer overlap thanks to 1755790c0) --- qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc b/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc index 1f5b9be61..18d0f4ad2 100644 --- a/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc +++ b/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc @@ -29,9 +29,7 @@ MUTATOR_HOOKFUNCTION(vh, GrappleHookThink) entity dmgent = ((SAME_TEAM(hook_owner, hook_aiment) && autocvar_g_vampirehook_teamheal) ? hook_owner : hook_aiment); Damage(dmgent, thehook, hook_owner, autocvar_g_vampirehook_damage, WEP_HOOK.m_id, DMG_NOWEP, thehook.origin, '0 0 0'); entity targ = ((SAME_TEAM(hook_owner, hook_aiment)) ? hook_aiment : hook_owner); - // TODO: we can't do this due to an issue with globals and the mutator arguments - //Heal(targ, hook_owner, autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max); - SetResourceExplicit(targ, RES_HEALTH, min(GetResource(targ, RES_HEALTH) + autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max)); + Heal(targ, hook_owner, autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max); if(dmgent == hook_owner) TakeResource(dmgent, RES_HEALTH, autocvar_g_vampirehook_damage); // FIXME: friendly fire?! -- 2.39.2