1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Send attachments instantly before set_pos (#10235)

This commit is contained in:
SmallJoker 2021-02-12 20:54:06 +01:00 committed by GitHub
parent 4db7fb4a3b
commit 375bcd65c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -1821,6 +1821,9 @@ void Server::SendMovePlayer(session_t peer_id)
PlayerSAO *sao = player->getPlayerSAO();
assert(sao);
// Send attachment updates instantly to the client prior updating position
sao->sendOutdatedData();
NetworkPacket pkt(TOCLIENT_MOVE_PLAYER, sizeof(v3f) + sizeof(f32) * 2, peer_id);
pkt << sao->getBasePosition() << sao->getLookPitch() << sao->getRotation().Y;