Skip to content
Permalink
Browse files

Reset touching_ground when in free_move

This corrects local player animation after enabling fly while standing on ground.
  • Loading branch information
sfan5 committed Jun 7, 2020
1 parent 09f9e46 commit 0ab580810c6ccebfd57497b9565e3e396d250d70
Showing with 4 additions and 0 deletions.
  1. +4 −0 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;

0 comments on commit 0ab5808

Please sign in to comment.
You can’t perform that action at this time.