Dont teleport back if holding sneak when detaching/turn freemove off
authorPilzAdam <pilzadam@minetest.net>
Sun, 19 May 2013 18:56:25 +0000 (20:56 +0200)
committerPilzAdam <pilzadam@minetest.net>
Sun, 19 May 2013 18:56:58 +0000 (20:56 +0200)
src/localplayer.cpp

index 13117d8811b54830ac5856c9fd63d867ba8ce9d6..f8dfca0500fb76458f1c8eaff12acabe6a190414 100644 (file)
@@ -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;
        }