forked from Mirrorlandia_minetest/minetest
Emit liquid sound if the player walks in liquid (#6040)
This commit is contained in:
parent
9da5fb1583
commit
c2df1a0835
@ -723,6 +723,9 @@ v3s16 LocalPlayer::getStandingNodePos()
|
|||||||
|
|
||||||
v3s16 LocalPlayer::getFootstepNodePos()
|
v3s16 LocalPlayer::getFootstepNodePos()
|
||||||
{
|
{
|
||||||
|
if (in_liquid_stable)
|
||||||
|
// Emit swimming sound if the player is in liquid
|
||||||
|
return floatToInt(getPosition(), BS);
|
||||||
if (touching_ground)
|
if (touching_ground)
|
||||||
// BS * 0.05 below the player's feet ensures a 1/16th height
|
// BS * 0.05 below the player's feet ensures a 1/16th height
|
||||||
// nodebox is detected instead of the node below it.
|
// nodebox is detected instead of the node below it.
|
||||||
|
Loading…
Reference in New Issue
Block a user