Stop all sound when stopping time

This commit is contained in:
2022-10-28 14:36:16 +01:00
parent d3233c7daa
commit 0150655c6d
16 changed files with 99 additions and 96 deletions
+2 -2
View File
@@ -105,9 +105,9 @@ updateRenderSplit u = do
return $! updateUniverse u
playSoundUnlessRewinding :: Universe -> IO (M.Map SoundOrigin Sound)
playSoundUnlessRewinding u = case w ^. timeFlow of
playSoundUnlessRewinding u = case w ^. cWorld . timeFlow of
NormalTimeFlow -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (_toPlaySounds w)
_ -> return M.empty
_ -> stopAllSounds >> return M.empty
where
w = _uvWorld u