mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Send ignore position ping after movement packet
This commit is contained in:
parent
3a72699e30
commit
1ab445d8e5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user