mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix player teleportation bug whilst sneaking
Only set back position when sneaking if player wasn't teleported by adding and using a bool "got_teleported" to player it fixes #2876
This commit is contained in:
parent
5a40a7dad8
commit
c0b6986e38
4 changed files with 7 additions and 1 deletions
|
@ -552,6 +552,7 @@ void Client::handleCommand_MovePlayer(NetworkPacket* pkt)
|
|||
|
||||
*pkt >> pos >> pitch >> yaw;
|
||||
|
||||
player->got_teleported = true;
|
||||
player->setPosition(pos);
|
||||
|
||||
infostream << "Client got TOCLIENT_MOVE_PLAYER"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue