From 1ab445d8e593920440ad694e1cb5bf60d1685f11 Mon Sep 17 00:00:00 2001 From: Goodlyay Date: Wed, 28 Feb 2024 00:27:36 -0800 Subject: [PATCH] Send ignore position ping after movement packet --- MCGalaxy/Network/ClassicProtocol.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MCGalaxy/Network/ClassicProtocol.cs b/MCGalaxy/Network/ClassicProtocol.cs index d6483dde9..2639b1d71 100644 --- a/MCGalaxy/Network/ClassicProtocol.cs +++ b/MCGalaxy/Network/ClassicProtocol.cs @@ -360,14 +360,13 @@ namespace MCGalaxy.Network // NOTE: Classic clients require offseting own entity by 22 units vertically if (id == Entities.SelfID) pos.Y -= 22; - DoIgnorePositionPing(id); Send(Packet.Teleport(id, pos, rot, player.hasExtPositions)); + DoIgnorePositionPing(id); } public override bool SendTeleport(byte id, Position pos, Orientation rot, Packet.TeleportMoveMode moveMode, bool usePos = true, bool interpolateOri = false, bool useOri = true) { if (!Supports(CpeExt.ExtEntityTeleport)) { return false; } - DoIgnorePositionPing(id); // NOTE: Classic clients require offseting own entity by 22 units vertically when using absolute location updates if ((moveMode == Packet.TeleportMoveMode.AbsoluteInstant || @@ -375,6 +374,7 @@ namespace MCGalaxy.Network { pos.Y -= 22; } Send(Packet.TeleportExt(id, usePos, moveMode, useOri, interpolateOri, pos, rot, player.hasExtPositions)); + DoIgnorePositionPing(id); return true; } void DoIgnorePositionPing(byte id) { @@ -567,7 +567,6 @@ namespace MCGalaxy.Network rot.RotY = (byte)(256 - temp); } - DoIgnorePositionPing(id); if (Supports(CpeExt.ExtPlayerList, 2)) { Send(Packet.ExtAddEntity2(id, skin, name, pos, rot, player.hasCP437, player.hasExtPositions)); @@ -577,6 +576,7 @@ namespace MCGalaxy.Network } else { Send(Packet.AddEntity(id, name, pos, rot, player.hasCP437, player.hasExtPositions)); } + DoIgnorePositionPing(id); } public override void SendLevel(Level prev, Level level) {