aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-05-19 20:56:25 +0200
committerPilzAdam <pilzadam@minetest.net>2013-05-19 20:56:58 +0200
commitbc66f4632372e62be53f3b61cd5cc4a82ee44741 (patch)
tree57c6c1daf15a64f38bc56999bce9cfaede6080ce /src
parentcc92e45b78dd8955e43b2828eafb4b4e3a0a1b99 (diff)
downloadminetest-bc66f4632372e62be53f3b61cd5cc4a82ee44741.tar.gz
minetest-bc66f4632372e62be53f3b61cd5cc4a82ee44741.tar.bz2
minetest-bc66f4632372e62be53f3b61cd5cc4a82ee44741.zip
Dont teleport back if holding sneak when detaching/turn freemove off
Diffstat (limited to 'src')
-rw-r--r--src/localplayer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 13117d881..f8dfca050 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -73,6 +73,7 @@ void LocalPlayer::move(f32 dtime, ClientEnvironment *env, f32 pos_max_d,
if(isAttached)
{
setPosition(overridePosition);
+ m_sneak_node_exists = false;
return;
}
@@ -85,6 +86,7 @@ void LocalPlayer::move(f32 dtime, ClientEnvironment *env, f32 pos_max_d,
{
position += m_speed * dtime;
setPosition(position);
+ m_sneak_node_exists = false;
return;
}