aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorMoNTE48 <MoNTE48@mail.ua>2019-12-11 20:03:12 +0100
committersfan5 <sfan5@live.de>2020-05-29 22:53:58 +0200
commit34862a644256f2717923de6d35288114a84acd19 (patch)
treebf1016c11acb41d023322b6e13843ffae721d9a8 /src/client
parent65a6a316d081d3951438bbbcfce74c9c65db407a (diff)
downloadminetest-34862a644256f2717923de6d35288114a84acd19.tar.gz
minetest-34862a644256f2717923de6d35288114a84acd19.tar.bz2
minetest-34862a644256f2717923de6d35288114a84acd19.zip
Add disable_jump check for the player's feet
Diffstat (limited to 'src/client')
-rw-r--r--src/client/localplayer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp
index c20c3619f..011898bcf 100644
--- a/src/client/localplayer.cpp
+++ b/src/client/localplayer.cpp
@@ -436,9 +436,11 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
Check properties of the node on which the player is standing
*/
const ContentFeatures &f = nodemgr->get(map->getNode(m_standing_node));
+ const ContentFeatures &f1 = nodemgr->get(map->getNode(m_standing_node + v3s16(0, 1, 0)));
// Determine if jumping is possible
- m_disable_jump = itemgroup_get(f.groups, "disable_jump");
+ m_disable_jump = itemgroup_get(f.groups, "disable_jump") ||
+ itemgroup_get(f1.groups, "disable_jump");
m_can_jump = ((touching_ground && !is_climbing) || sneak_can_jump) && !m_disable_jump;
// Jump key pressed while jumping off from a bouncy block