aboutsummaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp3
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.