diff options
author | Dániel Juhász <juhdanad@gmail.com> | 2017-06-24 18:15:00 +0000 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-06-24 20:15:00 +0200 |
commit | c2df1a08351101034f52fd2810051715714c9c40 (patch) | |
tree | 799c2a4e6cbc4401f18fd21587ba93196a324998 | |
parent | 9da5fb1583211b44afa4d28f3ccb64d768c56771 (diff) | |
download | minetest-c2df1a08351101034f52fd2810051715714c9c40.tar.gz minetest-c2df1a08351101034f52fd2810051715714c9c40.tar.bz2 minetest-c2df1a08351101034f52fd2810051715714c9c40.zip |
Emit liquid sound if the player walks in liquid (#6040)
-rw-r--r-- | src/localplayer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index aa38f338d..a77dcab0a 100644 --- 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. |