Navigation Menu

Skip to content

Commit

Permalink
- when adding some minmum lateral movement to trigger collision detec…
Browse files Browse the repository at this point in the history
…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 8b10d23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/playsim/p_mobj.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/actors/shared/fastprojectile.zs
Expand Up @@ -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;
Expand Down

0 comments on commit 8b10d23

Please sign in to comment.