fix: Removes run flag from NPC movement (#1357)

This commit is contained in:
Kamron Batman 2023-03-02 10:58:17 -08:00 • committed by GitHub
parent 0150e1a994
commit 57ff488d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View file

@ -8881,9 +8881,13 @@ public class Mobile : IHued, IComparable<Mobile>, ISpawnable, IObjectPropertyLis
return ret | (run ? Direction.Running : 0);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Direction GetDirectionTo(Point2D p, bool run = false) => GetDirectionTo(p.m_X, p.m_Y, run);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Direction GetDirectionTo(Point3D p, bool run = false) => GetDirectionTo(p.m_X, p.m_Y, run);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Direction GetDirectionTo(IPoint2D p, bool run = false) =>
p == null ? Direction.North | (run ? Direction.Running : 0) : GetDirectionTo(p.X, p.Y, run);