优化炮塔旋转音效播放条件
This commit is contained in:
parent
9e16d0faf5
commit
7e4f5eaf9c
1 changed files with 1 additions and 1 deletions
|
@ -215,7 +215,7 @@ public abstract class VehicleEntity extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void turretTurnSound(float diffX, float diffY, float pitch) {
|
public void turretTurnSound(float diffX, float diffY, float pitch) {
|
||||||
if (level().isClientSide && java.lang.Math.max(Mth.abs(diffX), Mth.abs(diffY)) > 0) {
|
if (level().isClientSide && (java.lang.Math.abs(diffY) > 0.5 || java.lang.Math.abs(diffX) > 0.5)) {
|
||||||
level().playLocalSound(this.getX(), this.getY() + this.getBbHeight() * 0.5, this.getZ(), ModSounds.TURRET_TURN.get(), this.getSoundSource(), (float) java.lang.Math.min(0.15 * (java.lang.Math.max(Mth.abs(diffX), Mth.abs(diffY))), 0.75), (random.nextFloat() * 0.05f + pitch), false);
|
level().playLocalSound(this.getX(), this.getY() + this.getBbHeight() * 0.5, this.getZ(), ModSounds.TURRET_TURN.get(), this.getSoundSource(), (float) java.lang.Math.min(0.15 * (java.lang.Math.max(Mth.abs(diffX), Mth.abs(diffY))), 0.75), (random.nextFloat() * 0.05f + pitch), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue