fix: Consolidates and fixes movement/direction checks (#1861)
This commit is contained in:
parent
06e05f2e52
commit
e6bfc45228
11 changed files with 146 additions and 320 deletions
|
|
@ -2182,7 +2182,8 @@ public abstract class BaseAI
|
|||
|
||||
if (map != null)
|
||||
{
|
||||
int x = m_Mobile.X, y = m_Mobile.Y;
|
||||
var x = m_Mobile.X;
|
||||
var y = m_Mobile.Y;
|
||||
Movement.Movement.Offset(d, ref x, ref y);
|
||||
|
||||
using var queue = PooledRefQueue<Item>.Create();
|
||||
|
|
|
|||
|
|
@ -1763,8 +1763,9 @@ namespace Server.Mobiles
|
|||
|
||||
newZ = foundation.Z + HouseFoundation.GetLevelZ(context.Level, context.Foundation);
|
||||
|
||||
int newX = X, newY = Y;
|
||||
Movement.Movement.Offset(d, ref newX, ref newY);
|
||||
var newX = X;
|
||||
var newY = Y;
|
||||
CalcMoves.Offset(d, ref newX, ref newY);
|
||||
|
||||
var startX = foundation.X + foundation.Components.Min.X + 1;
|
||||
var startY = foundation.Y + foundation.Components.Min.Y + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue