Skip to content

Commit

Permalink
Emit liquid sound if the player walks in liquid (#6040)
Browse files Browse the repository at this point in the history
  • Loading branch information
juhdanad authored and nerzhul committed Jun 24, 2017
1 parent 9da5fb1 commit c2df1a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/localplayer.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit c2df1a0

Please sign in to comment.