summaryrefslogtreecommitdiff
path: root/src/network/clientpackethandler.cpp
diff options
context:
space:
mode:
authorHybridDog <ovvv@web.de>2016-01-04 17:21:33 +0100
committerparamat <mat.gregory@virginmedia.com>2016-03-14 08:44:28 +0000
commitc0b6986e3875e6f42682c78fd5db0080a7bae651 (patch)
treebc03d65ada090bb6538e55912be1398a2918b3d8 /src/network/clientpackethandler.cpp
parent5a40a7dad8cbf46320c3b5dd1122808eb4919b62 (diff)
downloadminetest-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/clientpackethandler.cpp')
-rw-r--r--src/network/clientpackethandler.cpp1
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"