Skip to content

Commit 375bcd6

Browse files
authored
Send attachments instantly before set_pos (#10235)
1 parent 4db7fb4 commit 375bcd6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/server.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1821,6 +1821,9 @@ void Server::SendMovePlayer(session_t peer_id)
18211821
PlayerSAO *sao = player->getPlayerSAO();
18221822
assert(sao);
18231823

1824+
// Send attachment updates instantly to the client prior updating position
1825+
sao->sendOutdatedData();
1826+
18241827
NetworkPacket pkt(TOCLIENT_MOVE_PLAYER, sizeof(v3f) + sizeof(f32) * 2, peer_id);
18251828
pkt << sao->getBasePosition() << sao->getLookPitch() << sao->getRotation().Y;
18261829

src/server/luaentity_sao.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,9 @@ void LuaEntitySAO::sendPosition(bool do_interpolate, bool is_movement_end)
492492
if(isAttached())
493493
return;
494494

495+
// Send attachment updates instantly to the client prior updating position
496+
sendOutdatedData();
497+
495498
m_last_sent_move_precision = m_base_position.getDistanceFrom(
496499
m_last_sent_position);
497500
m_last_sent_position_timer = 0;

0 commit comments

Comments
 (0)