diff --git a/src/main/java/com/minelittlepony/unicopia/client/sound/MotionBasedSoundInstance.java b/src/main/java/com/minelittlepony/unicopia/client/sound/MotionBasedSoundInstance.java index 489b1bd8..80823061 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/sound/MotionBasedSoundInstance.java +++ b/src/main/java/com/minelittlepony/unicopia/client/sound/MotionBasedSoundInstance.java @@ -36,7 +36,7 @@ public class MotionBasedSoundInstance extends FadeOutSoundInstance { y = ((float)player.getY()); z = ((float)this.player.getZ()); - float f = (float)player.getVelocity().lengthSquared(); + float f = (float)player.getVelocity().horizontalLength(); if (f >= 1.0E-7D) { volume = MathHelper.clamp(f / 4F, 0, 1); } else { @@ -55,6 +55,8 @@ public class MotionBasedSoundInstance extends FadeOutSoundInstance { pitch = 1; } + setTargetVolume(volume); + return true; } }