]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/client/localplayer.cpp
Remove unused ITextSceneNode header (#11476)
[dragonfireclient.git] / src / client / localplayer.cpp
index c20c3619f48bf52a66e790cd79eaced9cd713443..f3eb1a2dd65f6f0c64a54e8aaf6a540a5faeb2e7 100644 (file)
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "localplayer.h"
 #include <cmath>
-#include "event.h"
+#include "mtevent.h"
 #include "collision.h"
 #include "nodedef.h"
 #include "settings.h"
@@ -200,6 +200,8 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
        if (noclip && free_move) {
                position += m_speed * dtime;
                setPosition(position);
+
+               touching_ground = false;
                added_velocity = v3f(0.0f); // ignored
                return;
        }
@@ -436,9 +438,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
@@ -785,6 +789,8 @@ void LocalPlayer::old_move(f32 dtime, Environment *env, f32 pos_max_d,
        if (free_move) {
                position += m_speed * dtime;
                setPosition(position);
+
+               touching_ground = false;
                m_sneak_node_exists = false;
                added_velocity = v3f(0.0f);
                return;