22w16c fixed sound trigonometry again because I'm a dumbass

This commit is contained in:
LAX1DUDE 2022-04-20 17:47:57 -07:00
parent 3b0229e87b
commit 8655ed05f0
10 changed files with 52404 additions and 52403 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1186,12 +1186,12 @@ public class EaglerAdapterImpl2 {
return s;
}
public static final void setListenerPos(float x, float y, float z, float vx, float vy, float vz, float pitch, float yaw) {
float var2 = MathHelper.cos(yaw * 0.017453292F - (float) Math.PI);
float var3 = MathHelper.sin(yaw * 0.017453292F - (float) Math.PI);
float var2 = MathHelper.cos(-yaw * 0.017453292F);
float var3 = MathHelper.sin(-yaw * 0.017453292F);
float var4 = -MathHelper.cos(pitch * 0.017453292F);
float var5 = MathHelper.sin(pitch * 0.017453292F);
ss.setListenerPosition(x, y, z);
ss.setListenerOrientation(var3 * var4, var5, var2 * var4, 0.0f, 1.0f, 0.0f);
ss.setListenerOrientation(-var3 * var4, -var5, -var2 * var4, 0.0f, 1.0f, 0.0f);
ss.setListenerVelocity(vx, vy, vz);
}
public static final void setPlaybackOffsetDelay(float f) {

View File

@ -4,7 +4,7 @@ public class ConfigConstants {
public static boolean profanity = false;
public static final String version = "22w16b";
public static final String version = "22w16c";
public static final String mainMenuString = "eaglercraft " + version;
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";

View File

@ -1565,13 +1565,13 @@ public class EaglerAdapterImpl2 {
public static native String getFileChooserResultName();
public static final void setListenerPos(float x, float y, float z, float vx, float vy, float vz, float pitch, float yaw) {
float var2 = MathHelper.cos(yaw * 0.017453292F - (float) Math.PI);
float var3 = MathHelper.sin(yaw * 0.017453292F - (float) Math.PI);
float var2 = MathHelper.cos(-yaw * 0.017453292F);
float var3 = MathHelper.sin(-yaw * 0.017453292F);
float var4 = -MathHelper.cos(pitch * 0.017453292F);
float var5 = MathHelper.sin(pitch * 0.017453292F);
AudioListener l = audioctx.getListener();
l.setPosition(x, y, z);
l.setOrientation(var3 * var4, var5, var2 * var4, 0.0f, 1.0f, 0.0f);
l.setOrientation(-var3 * var4, -var5, -var2 * var4, 0.0f, 1.0f, 0.0f);
}
private static int playbackId = 0;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long