aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-06-07 20:43:42 +0200
committersfan5 <sfan5@live.de>2020-06-07 20:45:26 +0200
commit0ab580810c6ccebfd57497b9565e3e396d250d70 (patch)
tree61dd5ff63c202d6bef7ba2a452039df3e1ce47dc /src
parent09f9e465e760cb8fd791222405a9e5e68a676ba0 (diff)
downloadminetest-0ab580810c6ccebfd57497b9565e3e396d250d70.tar.gz
minetest-0ab580810c6ccebfd57497b9565e3e396d250d70.tar.bz2
minetest-0ab580810c6ccebfd57497b9565e3e396d250d70.zip
Reset touching_ground when in free_move
This corrects local player animation after enabling fly while standing on ground.
Diffstat (limited to 'src')
-rw-r--r--src/client/localplayer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp
index 011898bcf..1e7040d57 100644
--- a/src/client/localplayer.cpp
+++ b/src/client/localplayer.cpp
@@ -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;
}
@@ -787,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;