mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- 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:
parent
9e26f3b7a4
commit
0835230454
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue