- P_SeekerMissile() now returns true when the projectile's speed is 0 and the tracer would otherwise be seekable. Fixes 0-speed missiles using A_SeekerMissile for special effects.

SVN r3610 (trunk)
This commit is contained in:
Randy Heit 2012-05-01 03:14:34 +00:00
parent 9e26f3b7a4
commit 0835230454

View file

@ -1491,7 +1491,7 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
speed = !usecurspeed ? actor->Speed : xs_CRoundToInt(TVector3<double>(actor->velx, actor->vely, actor->velz).Length());
target = actor->tracer;
if (target == NULL || speed == 0 || !actor->CanSeek(target))
if (target == NULL || !actor->CanSeek(target))
{
return false;
}
@ -1500,6 +1500,10 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
actor->tracer = NULL;
return false;
}
if (speed == 0)
{ // Technically, we're not seeking since our speed is 0, but the target *is* seekable.
return true;
}
dir = P_FaceMobj (actor, target, &delta);
if (delta > thresh)
{
@ -1561,7 +1565,6 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
actor->vely = FixedMul(xyscale, finesine[angle]);
}
return true;
}