From: terencehill Date: Sat, 13 Jul 2024 21:32:56 +0000 (+0200) Subject: Use the proper heal function to heal teammates with the Vampire hook (the global... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=26c6077657b100008384abb48af8b91ff42c9cb9;p=xonotic%2Fxonotic-data.pk3dir.git Use the proper heal function to heal teammates with the Vampire hook (the global mutator arguments no longer overlap thanks to 1755790c0) --- 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?!