fix: Fixes boat movement bugs & distorted entity placement. (#1457)

This commit is contained in:
Kamron Batman 2023-08-15 21:14:56 -07:00 committed by GitHub
parent 431e7fb8fe
commit 6e23afe7c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -1395,6 +1395,7 @@ namespace Server.Multis
_moveTimer.Stop();
_moveTimer.Delay = delay;
_moveTimer.Interval = interval;
_moveTimer.Single = singleNum;
}
else
{
@ -1807,8 +1808,10 @@ namespace Server.Multis
{
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)
{

View file

@ -30,7 +30,7 @@ namespace Server.Multis.Boats
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);