From abc975b09249ce23b3a3f6e6ac3f960385d30283 Mon Sep 17 00:00:00 2001 From: bahstrike Date: Tue, 2 Aug 2022 23:19:58 -0400 Subject: [PATCH] Revert "+i dunno, mostly done re-adding the player-based 3d listener.. just need to snatch the vectors.. stopping work because of previous comment saying it sounds wrong." This reverts commit d9a95b2d8a479f3168ae3407049e9cdafd104780. --- PlayerPos.cs | 5 ----- PluginCore.cs | 24 +----------------------- mainView.xml | 1 - 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/PlayerPos.cs b/PlayerPos.cs index 214166d..b8e2e01 100644 --- a/PlayerPos.cs +++ b/PlayerPos.cs @@ -32,8 +32,6 @@ public Position Position(Config.SoundMode mode) return Position(DetermineMode(mode)); } - public static bool UsePlayerAs3DListener = false; - public static Mode DetermineMode(Config.SoundMode mode) { switch (mode) @@ -44,9 +42,6 @@ public static Mode DetermineMode(Config.SoundMode mode) return Mode.Object; default: - if (UsePlayerAs3DListener) - return Mode.Object; - return Mode.Camera; } } diff --git a/PluginCore.cs b/PluginCore.cs index b6f64a6..5eaf256 100644 --- a/PluginCore.cs +++ b/PluginCore.cs @@ -236,7 +236,6 @@ protected override void Startup() (View["MusicVolume"] as HudHSlider).Position = 35; (View["PortalMusicEnable"] as HudCheckBox).Checked = true; - (View["UsePlayerAs3DListener"] as HudCheckBox).Checked = false; }; View["NearestDID"].Hit += delegate (object sender, EventArgs e) @@ -319,7 +318,6 @@ protected override void Startup() (View["MusicVolume"] as HudHSlider).Position = int.Parse(ini.GetKeyString(Core.CharacterFilter.AccountName, "MusicVolume", "35")); (View["PortalMusicEnable"] as HudCheckBox).Checked = ini.GetKeyString(Core.CharacterFilter.AccountName, "PortalMusicEnable", "1") != "0"; - (View["UsePlayerAs3DListener"] as HudCheckBox).Checked = ini.GetKeyString(Core.CharacterFilter.AccountName, "UsePlayerAs3DListener", "0") != "0"; } @@ -524,7 +522,6 @@ private void _CharacterFilter_Logoff(object sender, LogoffEventArgs e) ini.WriteKey(Core.CharacterFilter.AccountName, "MusicVolume", (View["MusicVolume"] as HudHSlider).Position.ToString()); ini.WriteKey(Core.CharacterFilter.AccountName, "PortalMusicEnable", (View["PortalMusicEnable"] as HudCheckBox).Checked ? "1" : "0"); - ini.WriteKey(Core.CharacterFilter.AccountName, "UsePlayerAs3DListener", (View["UsePlayerAs3DListener"] as HudCheckBox).Checked ? "1" : "0"); } } @@ -675,7 +672,6 @@ private void Process(double dt, double truedt) PerfTrack.Reset(); - PlayerPos.UsePlayerAs3DListener = (View["UsePlayerAs3DListener"] as HudCheckBox).Checked; Audio.AllowSound = GetUserEnableAudio(); @@ -1238,25 +1234,7 @@ private void Process(double dt, double truedt) PerfTrack.Start("Audio.Process"); { // do all this based on camera (listener MUST be camera for proper 3d audio without sounding weird) - - Vec3 listenPos; - Vec3 listenVel = Vec3.Zero; - Vec3 listenUp; - Vec3 listenForward; - - if(PlayerPos.UsePlayerAs3DListener) - { - // object mode - - } else - { - // camera mode (default) - listenPos = playerPos.CameraPos.Global; - listenUp = playerPos.CameraMat.Up; - listenForward = playerPos.CameraMat.Forward; - } - - Audio.Process(dt, truedt, listenPos, Vec3.Zero, listenUp, listenForward); + Audio.Process(dt, truedt, playerPos.CameraPos.Global, Vec3.Zero, playerPos.CameraMat.Up, playerPos.CameraMat.Forward); } diff --git a/mainView.xml b/mainView.xml index 1d2768a..181daca 100644 --- a/mainView.xml +++ b/mainView.xml @@ -13,7 +13,6 @@ -