Skip to content
Permalink
Browse files

- when adding some minmum lateral movement to trigger collision detec…

…tion, do not just set Vel.X but actually use a vector pointing in the proper facing direction of the actor.
  • Loading branch information...
coelckers committed Oct 20, 2019
1 parent 19c7e24 commit 8b10d231cd7f7c6832af29ad4ad759b47955108f
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/playsim/p_mobj.cpp
  2. +1 −1 wadsrc/static/zscript/actors/shared/fastprojectile.zs
@@ -3885,7 +3885,7 @@ void AActor::Tick ()
// (for backwards compatibility this must check for lack of damage function, not for zero damage!)
if ((flags & MF_MISSILE) && Vel.X == 0 && Vel.Y == 0 && !IsZeroDamage())
{
Vel.X = MinVel;
VelFromAngle(MinVel);
}

// Handle X and Y velocities
@@ -87,7 +87,7 @@ class FastProjectile : Actor
// force some lateral movement so that collision detection works as intended.
if (bMissile && Vel.X == 0 && Vel.Y == 0 && !IsZeroDamage())
{
Vel.X = MinVel;
VelFromAngle(MinVel);
}

Vector3 frac = Vel / count;

0 comments on commit 8b10d23

Please sign in to comment.
You can’t perform that action at this time.