diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 36b6b9a0c5..9a78512774 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