X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fvampirehook%2Fsv_vampirehook.qc;h=b30df3790a4da0073d3a6921a0336c4dd0387108;hb=a3a388a32d0ea11fe79341ef44edc21c5ba460f4;hp=115e6ca9109341fcaa4c61974eaafe416b342f15;hpb=a04a0bc093b1d181012cc562e25581b59de69395;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc b/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc index 115e6ca91..b30df3790 100644 --- a/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc +++ b/qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc @@ -21,16 +21,18 @@ MUTATOR_HOOKFUNCTION(vh, GrappleHookThink) if(!STAT(FROZEN, thehook.aiment)) if(time >= game_starttime) if(DIFF_TEAM(thehook.owner, thehook.aiment) || autocvar_g_vampirehook_teamheal) - if(GetResourceAmount(thehook.aiment, RESOURCE_HEALTH) > 0) + if(GetResource(thehook.aiment, RES_HEALTH) > 0) if(autocvar_g_vampirehook_damage) { thehook.last_dmg = time + autocvar_g_vampirehook_damagerate; thehook.owner.damage_dealt += autocvar_g_vampirehook_damage; Damage(dmgent, thehook, thehook.owner, autocvar_g_vampirehook_damage, WEP_HOOK.m_id, DMG_NOWEP, thehook.origin, '0 0 0'); entity targ = ((SAME_TEAM(thehook.owner, thehook.aiment)) ? thehook.aiment : thehook.owner); - Heal(targ, thehook.owner, autocvar_g_vampirehook_health_steal, g_pickup_healthsmall_max); + // TODO: we can't do this due to an issue with globals and the mutator arguments + //Heal(targ, thehook.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)); if(dmgent == thehook.owner) - TakeResource(dmgent, RESOURCE_HEALTH, autocvar_g_vampirehook_damage); // FIXME: friendly fire?! + TakeResource(dmgent, RES_HEALTH, autocvar_g_vampirehook_damage); // FIXME: friendly fire?! } }