From 6e23afe7c69cee5897801f2176f56d14f054759e Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:14:56 -0700 Subject: [PATCH] fix: Fixes boat movement bugs & distorted entity placement. (#1457) --- Projects/UOContent/Multis/Boats/BaseBoat.cs | 7 +++++-- Projects/UOContent/Multis/Boats/BoatPackets.cs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Projects/UOContent/Multis/Boats/BaseBoat.cs b/Projects/UOContent/Multis/Boats/BaseBoat.cs index eb8156a926..def1f12355 100644 --- a/Projects/UOContent/Multis/Boats/BaseBoat.cs +++ b/Projects/UOContent/Multis/Boats/BaseBoat.cs @@ -1395,6 +1395,7 @@ private bool SafelyStartMoveTimer(TimeSpan interval, bool single) _moveTimer.Stop(); _moveTimer.Delay = delay; _moveTimer.Interval = interval; + _moveTimer.Single = singleNum; } else { @@ -1807,8 +1808,10 @@ public bool Move(Direction dir, int speed, int clientSpeed, bool message) { item.NoMoveHS = true; - // Already filtered for Tiller/Hold/Plank/EffectItem - item.Location = new Point3D(item.X + xOffset, item.Y + yOffset, item.Z); + if (item is not (Server.Items.TillerMan or Server.Items.Hold or Plank)) + { + item.Location = new Point3D(item.X + xOffset, item.Y + yOffset, item.Z); + } } else if (e is Mobile m) { diff --git a/Projects/UOContent/Multis/Boats/BoatPackets.cs b/Projects/UOContent/Multis/Boats/BoatPackets.cs index 23e7d508b7..2d3a510947 100644 --- a/Projects/UOContent/Multis/Boats/BoatPackets.cs +++ b/Projects/UOContent/Multis/Boats/BoatPackets.cs @@ -30,7 +30,7 @@ public static void SendMoveBoatHS(this NetState ns, Mobile beholder, BaseBoat bo return; } - var minLength = 68; // 18 + 5 * 10 + const int minLength = 68; // 18 + 5 * 10 var writer = new SpanWriter(stackalloc byte[minLength], true); writer.Write((byte)0xF6); // Packet ID writer.Seek(2, SeekOrigin.Current);