mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-09 17:38:07 +00:00
Use BYTE Win Typedef instead of byte typedef from Minecraft.World
This commit is contained in:
@@ -152,7 +152,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl
|
||||
)
|
||||
{
|
||||
teleportDelay = 0;
|
||||
packet = std::make_shared<TeleportEntityPacket>(e->entityId, xn, yn, zn, static_cast<byte>(yRotn), static_cast<byte>(xRotn));
|
||||
packet = std::make_shared<TeleportEntityPacket>(e->entityId, xn, yn, zn, static_cast<BYTE>(yRotn), static_cast<BYTE>(xRotn));
|
||||
// printf("%d: New teleport rot %d\n",e->entityId,yRotn);
|
||||
yRotp = yRotn;
|
||||
xRotp = xRotn;
|
||||
@@ -205,7 +205,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl
|
||||
( za >= -16 ) && ( za <= 15 ) &&
|
||||
( ya >= -32 ) && ( ya <= 31 ) )
|
||||
{
|
||||
// use the packet with small packet with rotation if we can - 5 bits each for x & z, and 6 for y - still a byte less than the alternative
|
||||
// use the packet with small packet with rotation if we can - 5 bits each for x & z, and 6 for y - still a BYTE less than the alternative
|
||||
packet = std::make_shared<MoveEntityPacketSmall::PosRot>(e->entityId, static_cast<char>(xa), static_cast<char>(ya), static_cast<char>(za), 0, 0);
|
||||
c1b++;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl
|
||||
if (rot)
|
||||
{
|
||||
// 4J: Changed this to use deltas
|
||||
broadcast(std::make_shared<MoveEntityPacket::Rot>(e->entityId, static_cast<byte>(yRota), static_cast<byte>(xRota)));
|
||||
broadcast(std::make_shared<MoveEntityPacket::Rot>(e->entityId, static_cast<BYTE>(yRota), static_cast<BYTE>(xRota)));
|
||||
yRotp = yRotn;
|
||||
xRotp = xRotn;
|
||||
}
|
||||
@@ -308,7 +308,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector<shared_ptr<Player> > *pl
|
||||
int yHeadRot = Mth::floor(e->getYHeadRot() * 256 / 360);
|
||||
if (abs(yHeadRot - yHeadRotp) >= TOLERANCE_LEVEL)
|
||||
{
|
||||
broadcast(std::make_shared<RotateHeadPacket>(e->entityId, static_cast<byte>(yHeadRot)));
|
||||
broadcast(std::make_shared<RotateHeadPacket>(e->entityId, static_cast<BYTE>(yHeadRot)));
|
||||
yHeadRotp = yHeadRot;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user