projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09f9e46
)
Reset touching_ground when in free_move
author
sfan5
<sfan5@live.de>
Sun, 7 Jun 2020 18:43:42 +0000
(20:43 +0200)
committer
sfan5
<sfan5@live.de>
Sun, 7 Jun 2020 18:45:26 +0000
(20:45 +0200)
This corrects local player animation after enabling fly while standing on ground.
src/client/localplayer.cpp
patch
|
blob
|
history
diff --git
a/src/client/localplayer.cpp
b/src/client/localplayer.cpp
index 011898bcf2ee908be4d68a8431ca561f1d413018..1e7040d57d756de2d9269283e0cfb522bb99e6a2 100644
(file)
--- 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;