From 3063312f7f01529b7cef8f9a23fed18fca3bd923 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 10 Mar 2016 10:25:44 +0200 Subject: [PATCH] Fixed resurrection distance check See http://forum.zdoom.org/viewtopic.php?t=51177 --- src/p_enemy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 36b6b9a0c..9a7851277 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2618,8 +2618,8 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates) // use the current actor's radius instead of the Arch Vile's default. fixed_t maxdist = corpsehit->GetDefault()->radius + self->radius; - if (abs(cres.position.x - viletry.x) > maxdist || - abs(cres.position.y - viletry.y) > maxdist) + if (abs(corpsehit->Pos().x - cres.position.x) > maxdist || + abs(corpsehit->Pos().y - cres.position.y) > maxdist) continue; // not actually touching // Let's check if there are floors in between the archvile and its target