diff options
author | PilzAdam <adam-k@outlook.com> | 2012-12-02 12:17:05 +0100 |
---|---|---|
committer | PilzAdam <adam-k@outlook.com> | 2012-12-11 19:04:55 +0100 |
commit | 9786202b089622dceacb9deb678e6d6938a24719 (patch) | |
tree | 556a368f497f386c63cb8168af23aee6065cb3d6 | |
parent | 52ba413185f96add259c480a68f5dffa389e80f4 (diff) | |
download | minetest-9786202b089622dceacb9deb678e6d6938a24719.tar.gz minetest-9786202b089622dceacb9deb678e6d6938a24719.tar.bz2 minetest-9786202b089622dceacb9deb678e6d6938a24719.zip |
Dont sneak while flying
-rw-r--r-- | src/localplayer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 96ddb4bb2..8189e46a5 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -159,7 +159,7 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d, If sneaking, keep in range from the last walked node and don't fall off from it */ - if(control.sneak && m_sneak_node_exists) + if(control.sneak && m_sneak_node_exists && !g_settings->getBool("free_move")) { f32 maxd = 0.5*BS + sneak_max; v3f lwn_f = intToFloat(m_sneak_node, BS); @@ -540,7 +540,7 @@ void LocalPlayer::applyControl(float dtime) // The speed of the player (Y is ignored) if(superspeed) speed = speed.normalize() * walkspeed_max * 5.0; - else if(control.sneak) + else if(control.sneak && !free_move) speed = speed.normalize() * walkspeed_max / 3.0; else speed = speed.normalize() * walkspeed_max; |