mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02: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:
@@ -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"
|
||||
|
Reference in New Issue
Block a user