4th batch

This commit is contained in:
Leah Anderson
2026-03-02 12:00:59 -07:00
parent 9cfc2e5b16
commit 79c1737c34
33 changed files with 94 additions and 93 deletions

View File

@@ -44,7 +44,7 @@ AddPlayerPacket::AddPlayerPacket(shared_ptr<Player> player, PlayerUID xuid, Play
// 4J - changed - send current "previously sent" value of rotations to put this in sync with other clients
yRot = yRotp;
xRot = xRotp;
yHeadRot = static_cast<std::byte>(yHeadRotp); // 4J Added
yHeadRot = static_cast<byte>(yHeadRotp); // 4J Added
// yRot = (byte) (player->yRot * 256 / 360);
// xRot = (byte) (player->xRot * 256 / 360);
@@ -96,13 +96,13 @@ void AddPlayerPacket::write(DataOutputStream *dos) //throws IOException
dos->writeInt(x);
dos->writeInt(y);
dos->writeInt(z);
dos->writeByte(static_cast<std::byte>(yRot));
dos->writeByte(static_cast<std::byte>(xRot));
dos->writeByte(static_cast<std::byte>(m_playerIndex)); // 4J Added
dos->writeByte(static_cast<byte>(yRot));
dos->writeByte(static_cast<byte>(xRot));
dos->writeByte(static_cast<byte>(m_playerIndex)); // 4J Added
dos->writeShort(carriedItem);
dos->writePlayerUID(xuid);
dos->writePlayerUID(OnlineXuid);
dos->writeByte(static_cast<std::byte>(m_playerIndex)); // 4J Added
dos->writeByte(static_cast<byte>(m_playerIndex)); // 4J Added
dos->writeInt(m_skinId);
dos->writeInt(m_capeId);
dos->writeInt(m_uiGamePrivileges);