actually more simple fix

This commit is contained in:
sylvessa 2026-03-23 16:13:58 -05:00
parent b6618fb023
commit 7d88b9c5b7

View file

@ -519,17 +519,6 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, shared_ptr<ServerPlayer
{ {
seenBy.insert(sp); seenBy.insert(sp);
shared_ptr<Packet> packet = getAddEntityPacket(); shared_ptr<Packet> packet = getAddEntityPacket();
if (e->instanceof(eTYPE_SERVERPLAYER))
{
shared_ptr<AddPlayerPacket> addPlayerPkt = dynamic_pointer_cast<AddPlayerPacket>(packet);
if (addPlayerPkt != nullptr)
{
addPlayerPkt->xuid = INVALID_XUID;
addPlayerPkt->OnlineXuid = INVALID_XUID;
}
}
sp->connection->send(packet); sp->connection->send(packet);
xap = e->xd; xap = e->xd;
@ -664,11 +653,12 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket()
PlayerUID xuid = INVALID_XUID; PlayerUID xuid = INVALID_XUID;
PlayerUID OnlineXuid = INVALID_XUID; PlayerUID OnlineXuid = INVALID_XUID;
if( player != nullptr ) // do not pass xuid/onlinxuid to cleints
{ //if( player != nullptr )
xuid = player->getXuid(); //{
OnlineXuid = player->getOnlineXuid(); // xuid = player->getXuid();
} // OnlineXuid = player->getOnlineXuid();
//}
// 4J Added yHeadRotp param to fix #102563 - TU12: Content: Gameplay: When one of the Players is idle for a few minutes his head turns 180 degrees. // 4J Added yHeadRotp param to fix #102563 - TU12: Content: Gameplay: When one of the Players is idle for a few minutes his head turns 180 degrees.
return std::make_shared<AddPlayerPacket>(player, xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp, yHeadRotp); return std::make_shared<AddPlayerPacket>(player, xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp, yHeadRotp);
} }