summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityLightning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityLightning.patch')
-rw-r--r--nms-patches/EntityLightning.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/nms-patches/EntityLightning.patch b/nms-patches/EntityLightning.patch
index 58617843..560ab8d6 100644
--- a/nms-patches/EntityLightning.patch
+++ b/nms-patches/EntityLightning.patch
@@ -49,7 +49,7 @@
public void m() {
super.m();
if (this.lifeTicks == 2) {
-- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dh, SoundCategory.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
+- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.di, SoundCategory.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
+ // CraftBukkit start - Use relative location for far away sounds
+ // this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dc, SoundCategory.d, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
+ float pitch = 0.8F + this.random.nextFloat() * 0.2F;
@@ -62,13 +62,13 @@
+ double deltaLength = Math.sqrt(distanceSquared);
+ double relativeX = player.locX + (deltaX / deltaLength) * viewDistance;
+ double relativeZ = player.locZ + (deltaZ / deltaLength) * viewDistance;
-+ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.dh, SoundCategory.WEATHER, relativeX, this.locY, relativeZ, 10000.0F, pitch));
++ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.di, SoundCategory.WEATHER, relativeX, this.locY, relativeZ, 10000.0F, pitch));
+ } else {
-+ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.dh, SoundCategory.WEATHER, this.locX, this.locY, this.locZ, 10000.0F, pitch));
++ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.di, SoundCategory.WEATHER, this.locX, this.locY, this.locZ, 10000.0F, pitch));
+ }
+ }
+ // CraftBukkit end
- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dg, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F);
+ this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dh, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F);
}
@@ -57,13 +86,17 @@