mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Send attachments instantly before set_pos (#10235)
This commit is contained in:
parent
4db7fb4a3b
commit
375bcd65c1
@ -1821,6 +1821,9 @@ void Server::SendMovePlayer(session_t peer_id)
|
|||||||
PlayerSAO *sao = player->getPlayerSAO();
|
PlayerSAO *sao = player->getPlayerSAO();
|
||||||
assert(sao);
|
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);
|
NetworkPacket pkt(TOCLIENT_MOVE_PLAYER, sizeof(v3f) + sizeof(f32) * 2, peer_id);
|
||||||
pkt << sao->getBasePosition() << sao->getLookPitch() << sao->getRotation().Y;
|
pkt << sao->getBasePosition() << sao->getLookPitch() << sao->getRotation().Y;
|
||||||
|
|
||||||
|
@ -492,6 +492,9 @@ void LuaEntitySAO::sendPosition(bool do_interpolate, bool is_movement_end)
|
|||||||
if(isAttached())
|
if(isAttached())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Send attachment updates instantly to the client prior updating position
|
||||||
|
sendOutdatedData();
|
||||||
|
|
||||||
m_last_sent_move_precision = m_base_position.getDistanceFrom(
|
m_last_sent_move_precision = m_base_position.getDistanceFrom(
|
||||||
m_last_sent_position);
|
m_last_sent_position);
|
||||||
m_last_sent_position_timer = 0;
|
m_last_sent_position_timer = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user