diff --git a/src/AcDream.Core.Net/Messages/UpdatePosition.cs b/src/AcDream.Core.Net/Messages/UpdatePosition.cs index cccfe4c..e4978cf 100644 --- a/src/AcDream.Core.Net/Messages/UpdatePosition.cs +++ b/src/AcDream.Core.Net/Messages/UpdatePosition.cs @@ -64,6 +64,7 @@ public static class UpdatePosition CreateObject.ServerPosition Position, System.Numerics.Vector3? Velocity, uint? PlacementId, + bool IsGrounded, ushort InstanceSequence = 0, ushort TeleportSequence = 0, ushort ForcePositionSequence = 0); @@ -164,6 +165,7 @@ public static class UpdatePosition RotationW: rw, RotationX: rx, RotationY: ry, RotationZ: rz); return new Parsed(guid, serverPos, velocity, placementId, + IsGrounded: (flags & PositionFlags.IsGrounded) != 0, instSeq, teleSeq, forceSeq); } catch diff --git a/src/AcDream.Core.Net/WorldSession.cs b/src/AcDream.Core.Net/WorldSession.cs index 47ef10b..3e76509 100644 --- a/src/AcDream.Core.Net/WorldSession.cs +++ b/src/AcDream.Core.Net/WorldSession.cs @@ -110,7 +110,8 @@ public sealed class WorldSession : IDisposable public readonly record struct EntityPositionUpdate( uint Guid, CreateObject.ServerPosition Position, - System.Numerics.Vector3? Velocity); + System.Numerics.Vector3? Velocity, + bool IsGrounded); /// /// Fires when the session parses a 0xF748 UpdatePosition game message. @@ -711,7 +712,8 @@ public sealed class WorldSession : IDisposable PositionUpdated?.Invoke(new EntityPositionUpdate( posUpdate.Value.Guid, posUpdate.Value.Position, - posUpdate.Value.Velocity)); + posUpdate.Value.Velocity, + posUpdate.Value.IsGrounded)); } } else if (op == VectorUpdate.Opcode)