mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Fixed wind sounds whilst not fading
This commit is contained in:
parent
2e14403f93
commit
2f5c191bd2
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue