]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2917 "Issues with vampirehook and warpzones"
authorterencehill <piuntn@gmail.com>
Sat, 13 Jul 2024 22:09:03 +0000 (00:09 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 13 Jul 2024 22:28:07 +0000 (00:28 +0200)
qcsrc/common/mutators/mutator/vampirehook/sv_vampirehook.qc

index 18d0f4ad20409806083e40e218c350bc6ff08da4..e484d011341beea82308ff62823cf322b11e9496 100644 (file)
@@ -17,10 +17,10 @@ MUTATOR_HOOKFUNCTION(vh, GrappleHookThink)
        if (!autocvar_g_vampirehook_damage || thehook.last_dmg > time || time < game_starttime)
                return;
 
-       entity hook_owner = thehook.owner;
+       entity hook_owner = thehook.realowner;
        entity hook_aiment = thehook.aiment;
 
-       if (IS_PLAYER(hook_aiment) && !STAT(FROZEN, hook_aiment)
+       if (hook_owner != hook_aiment && IS_PLAYER(hook_aiment) && !STAT(FROZEN, hook_aiment)
                && (DIFF_TEAM(hook_owner, hook_aiment) || autocvar_g_vampirehook_teamheal)
                && GetResource(hook_aiment, RES_HEALTH) > 0)
        {