From 080896eaabb555755bac8612caad5ae7fe7e2cd7 Mon Sep 17 00:00:00 2001 From: Lilith Song Date: Sat, 17 Feb 2024 01:11:55 -0500 Subject: [PATCH] [PR] Prevent volume stutters on no-bgm mounts Mount BGM will now be automatically disabled when unmounting, so that volume doesn't stutter when using a BGM-disabled mount. --- AutoMountBgm/AutoMountBgm.csproj | 2 +- AutoMountBgm/Plugin.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AutoMountBgm/AutoMountBgm.csproj b/AutoMountBgm/AutoMountBgm.csproj index 8cfc00c..317947f 100644 --- a/AutoMountBgm/AutoMountBgm.csproj +++ b/AutoMountBgm/AutoMountBgm.csproj @@ -2,7 +2,7 @@ AutoMountBGM - 2.0.0 + 2.0.1 Automatically enables/disables mount BGM depending on the mount you use Copyleft VariableVixen 2023 diff --git a/AutoMountBgm/Plugin.cs b/AutoMountBgm/Plugin.cs index bc58e98..425db3c 100644 --- a/AutoMountBgm/Plugin.cs +++ b/AutoMountBgm/Plugin.cs @@ -57,11 +57,11 @@ private unsafe ushort mountId { private void onConditionChanged(ConditionFlag flag, bool value) { if (flag is not (ConditionFlag.Mounted or ConditionFlag.Mounted2)) return; - if (!value) - return; ushort mount = this.mountId; - if (mount is 0) + if (!value || mount is 0) { // disable mount bgm when unmounting to prevent volume stutters when using a disabled mount + GameConfig.Set(SystemConfigOption.SoundChocobo, false); return; + } if (Config.BgmDisabledMounts.Contains(mount)) GameConfig.Set(SystemConfigOption.SoundChocobo, false);