From 8b10d231cd7f7c6832af29ad4ad759b47955108f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 20 Oct 2019 14:02:28 +0200 Subject: [PATCH] - when adding some minmum lateral movement to trigger collision detection, do not just set Vel.X but actually use a vector pointing in the proper facing direction of the actor. --- src/playsim/p_mobj.cpp | 2 +- wadsrc/static/zscript/actors/shared/fastprojectile.zs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 56e88002b..ee6008c2b 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -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 diff --git a/wadsrc/static/zscript/actors/shared/fastprojectile.zs b/wadsrc/static/zscript/actors/shared/fastprojectile.zs index da0c003e1..befc4252d 100644 --- a/wadsrc/static/zscript/actors/shared/fastprojectile.zs +++ b/wadsrc/static/zscript/actors/shared/fastprojectile.zs @@ -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;