From 0ab580810c6ccebfd57497b9565e3e396d250d70 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 7 Jun 2020 20:43:42 +0200 Subject: [PATCH] Reset touching_ground when in free_move This corrects local player animation after enabling fly while standing on ground. --- src/client/localplayer.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.25.1