Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Fix music not unpausing correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluviolithic committed Nov 29, 2023
1 parent d5d8ab1 commit 72c3755
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/GameAtmosphere/Soundscape/SoundSystem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ local player = Players.LocalPlayer
store.changed:connect(function(newState, oldState)
local oldPrimarySoundRegion = selectors.getAudioData(oldState, player.Name).PrimarySoundRegion
local newPrimarySoundRegion = selectors.getAudioData(newState, player.Name).PrimarySoundRegion
local oldBackgroundMusicSetting = selectors.getSetting(oldState, player.Name, "BackgroundMusic")

if not selectors.getSetting(newState, player.Name, "BackgroundMusic") then
newPrimarySoundRegion = nil
end

if oldPrimarySoundRegion ~= newPrimarySoundRegion then
if oldPrimarySoundRegion ~= newPrimarySoundRegion or not oldBackgroundMusicSetting then
if newPrimarySoundRegion then
if oldPrimarySoundRegion then
volumeKnobs.off[oldPrimarySoundRegion]:Play()
Expand Down

0 comments on commit 72c3755

Please sign in to comment.