forked from Mirrorlandia_minetest/minetest
Reset touching_ground when in free_move
This corrects local player animation after enabling fly while standing on ground.
This commit is contained in:
parent
09f9e465e7
commit
0ab580810c
@ -200,6 +200,8 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
|
|||||||
if (noclip && free_move) {
|
if (noclip && free_move) {
|
||||||
position += m_speed * dtime;
|
position += m_speed * dtime;
|
||||||
setPosition(position);
|
setPosition(position);
|
||||||
|
|
||||||
|
touching_ground = false;
|
||||||
added_velocity = v3f(0.0f); // ignored
|
added_velocity = v3f(0.0f); // ignored
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -787,6 +789,8 @@ void LocalPlayer::old_move(f32 dtime, Environment *env, f32 pos_max_d,
|
|||||||
if (free_move) {
|
if (free_move) {
|
||||||
position += m_speed * dtime;
|
position += m_speed * dtime;
|
||||||
setPosition(position);
|
setPosition(position);
|
||||||
|
|
||||||
|
touching_ground = false;
|
||||||
m_sneak_node_exists = false;
|
m_sneak_node_exists = false;
|
||||||
added_velocity = v3f(0.0f);
|
added_velocity = v3f(0.0f);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user