1
0
Fork 0

Emit liquid sound if the player walks in liquid (#6040)

mutilcraft-mt53
Dániel Juhász 2017-06-24 18:15:00 +00:00 committed by Loïc Blot
parent 9da5fb1583
commit c2df1a0835
1 changed files with 3 additions and 0 deletions

View File

@ -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.