Fixed resurrection distance check

See http://forum.zdoom.org/viewtopic.php?t=51177
This commit is contained in:
alexey.lysiuk 2016-03-10 10:25:44 +02:00
parent a605913f42
commit 3063312f7f

View file

@ -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