- fixed: AFastProjectile did not work properly for perfectly vertically moving missiles. Like AActor::Tick it needs to ensure that a tiny bit of lateral movement is present so that collision detection and the Effect() function work as intended.

This commit is contained in:
Christoph Oelckers 2016-10-02 14:37:26 +02:00
parent 0bce6e3925
commit 865863ab6f

View file

@ -54,6 +54,12 @@ void AFastProjectile::Tick ()
// Handle movement // Handle movement
if (!Vel.isZero() || (Z() != floorz)) if (!Vel.isZero() || (Z() != floorz))
{ {
// force some lateral movement so that collision detection works as intended.
if ((flags & MF_MISSILE) && Vel.X == 0 && Vel.Y == 0 && !IsZeroDamage())
{
Vel.X = MinVel;
}
frac = Vel / count; frac = Vel / count;
changexy = frac.X != 0 || frac.Y != 0; changexy = frac.X != 0 || frac.Y != 0;
int ripcount = count / 8; int ripcount = count / 8;