mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- 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:
parent
0bce6e3925
commit
865863ab6f
1 changed files with 6 additions and 0 deletions
|
@ -54,6 +54,12 @@ void AFastProjectile::Tick ()
|
|||
// Handle movement
|
||||
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;
|
||||
changexy = frac.X != 0 || frac.Y != 0;
|
||||
int ripcount = count / 8;
|
||||
|
|
Loading…
Reference in a new issue