diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 751478213..df139b846 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -153,7 +153,7 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d, float player_height = BS*1.55; // Maximum distance over border for sneaking - f32 sneak_max = BS*0.4; + f32 sneak_max = BS*0.3; /* If sneaking, keep in range from the last walked node and don't @@ -267,8 +267,8 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d, // The node to be sneaked on has to be walkable if(nodemgr->get(map.getNode(p)).walkable == false) continue; - // And the node above it has to be nonwalkable - if(nodemgr->get(map.getNode(p+v3s16(0,1,0))).walkable == true) + // And the two nodes above it have to be non-walkable + if(nodemgr->get(map.getNode(p+v3s16(0,1,0))).walkable == true || nodemgr->get(map.getNode(p+v3s16(0,2,0))).walkable == true) continue; } catch(InvalidPositionException &e) @@ -284,7 +284,7 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d, m_sneak_node = new_sneak_node; m_sneak_node_exists = sneak_node_found; - + /* If sneaking, the player's collision box can be in air, so this has to be set explicitly @@ -302,7 +302,7 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d, Report collisions */ bool bouncy_jump = false; - // Dont report if flying + // Don't report if flying if(collision_info && !(g_settings->getBool("free_move") && fly_allowed)) { for(size_t i=0; i