Skip to content

Commit 29e8a91

Browse files
committed
Fixed stereo offset distance calculation
1 parent ce50c03 commit 29e8a91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/xxmicloxx/NoteBlockAPI/model/playmode/StereoMode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void play(Player player, Location location, Song song, Layer layer, Note
2424

2525
float distance = 0;
2626
if (layer.getPanning() == 100){
27-
distance = (note.getPanning() - 100) * maxDistance;
27+
distance = ((note.getPanning() - 100) / 100f) * maxDistance;
2828
} else {
2929
distance = ((layer.getPanning() - 100 + note.getPanning() - 100) / 200f) * maxDistance;
3030
}
@@ -56,7 +56,7 @@ public void play(Player player, Location location, Song song, Layer layer, Note
5656

5757
float distance = 0;
5858
if (layer.getPanning() == 100){
59-
distance = (note.getPanning() - 100) * maxDistance;
59+
distance = ((note.getPanning() - 100) / 100f) * maxDistance;
6060
} else {
6161
distance = ((layer.getPanning() - 100 + note.getPanning() - 100) / 200f) * maxDistance;
6262
}

0 commit comments

Comments
 (0)