Skip to content

Commit

Permalink
[PR] Prevent volume stutters on no-bgm mounts
Browse files Browse the repository at this point in the history
Mount BGM will now be automatically disabled when unmounting, so that volume doesn't stutter when using a BGM-disabled mount.
  • Loading branch information
PrincessRTFM committed Feb 17, 2024
1 parent 553129d commit 080896e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AutoMountBgm/AutoMountBgm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Product>AutoMountBGM</Product>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<Description>Automatically enables/disables mount BGM depending on the mount you use</Description>
<Copyright>Copyleft VariableVixen 2023</Copyright>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions AutoMountBgm/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 080896e

Please sign in to comment.