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:
9da5fb1
)
Emit liquid sound if the player walks in liquid (#6040)
author
Dániel Juhász
<juhdanad@gmail.com>
Sat, 24 Jun 2017 18:15:00 +0000
(18:15 +0000)
committer
Loïc Blot
<nerzhul@users.noreply.github.com>
Sat, 24 Jun 2017 18:15:00 +0000
(20:15 +0200)
src/localplayer.cpp
patch
|
blob
|
history
diff --git
a/src/localplayer.cpp
b/src/localplayer.cpp
index aa38f338d0af067a9f6abc44be6676bcd3152040..a77dcab0a6708915708f8ca14743f017ce324133 100644
(file)
--- a/
src/localplayer.cpp
+++ b/
src/localplayer.cpp
@@
-723,6
+723,9
@@
v3s16 LocalPlayer::getStandingNodePos()
v3s16 LocalPlayer::getFootstepNodePos()
{
+ if (in_liquid_stable)
+ // Emit swimming sound if the player is in liquid
+ return floatToInt(getPosition(), BS);
if (touching_ground)
// BS * 0.05 below the player's feet ensures a 1/16th height
// nodebox is detected instead of the node below it.