diff options
author | HybridDog <ovvv@web.de> | 2016-01-04 17:21:33 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2016-03-14 08:44:28 +0000 |
commit | c0b6986e3875e6f42682c78fd5db0080a7bae651 (patch) | |
tree | bc03d65ada090bb6538e55912be1398a2918b3d8 /src/network | |
parent | 5a40a7dad8cbf46320c3b5dd1122808eb4919b62 (diff) | |
download | minetest-c0b6986e3875e6f42682c78fd5db0080a7bae651.tar.gz minetest-c0b6986e3875e6f42682c78fd5db0080a7bae651.tar.bz2 minetest-c0b6986e3875e6f42682c78fd5db0080a7bae651.zip |
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
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/clientpackethandler.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index a49bbe167..28d147d38 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -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" |