diff options
author | gregorycu <gregory.currie@gmail.com> | 2015-02-01 14:40:50 +1100 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-08-06 03:14:56 -0400 |
commit | 5c3c965c1a6e1fb5957d441c2d04d8470b80d710 (patch) | |
tree | dd0da1aa70c9d0edca1ce5a02cd760f78ef37b96 /src | |
parent | 8560ece02e36b1e0ee7b86db2a38b8becbb639e4 (diff) | |
download | minetest-5c3c965c1a6e1fb5957d441c2d04d8470b80d710.tar.gz minetest-5c3c965c1a6e1fb5957d441c2d04d8470b80d710.tar.bz2 minetest-5c3c965c1a6e1fb5957d441c2d04d8470b80d710.zip |
Fix detection of sneaking node
This fixes bug 1551
Diffstat (limited to 'src')
-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 1a59504ef..aee862200 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -230,7 +230,7 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d, player is sneaking from, if any. If the node from under the player has been removed, the player falls. */ - v3s16 current_node = floatToInt(position - v3f(0,BS/2,0), BS); + v3s16 current_node = floatToInt(position - v3f(0, 0.05 * BS, 0), BS); if(m_sneak_node_exists && nodemgr->get(map->getNodeNoEx(m_old_node_below)).name == "air" && m_old_node_below_type != "air") @@ -248,7 +248,7 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d, } if(m_need_to_get_new_sneak_node && physics_override_sneak) { - v3s16 pos_i_bottom = floatToInt(position - v3f(0,BS/2,0), BS); + v3s16 pos_i_bottom = floatToInt(position - v3f(0, 0.05 * BS ,0), BS); v2f player_p2df(position.X, position.Z); f32 min_distance_f = 100000.0*BS; // If already seeking from some node, compare to it. |