Allow sounds to play after death
This commit is contained in:
@@ -110,6 +110,7 @@ updateRenderSplit win u = do
|
|||||||
playSoundUnlessRewinding :: Universe -> IO (M.Map SoundOrigin Sound)
|
playSoundUnlessRewinding :: Universe -> IO (M.Map SoundOrigin Sound)
|
||||||
playSoundUnlessRewinding u = case w ^. timeFlow of
|
playSoundUnlessRewinding u = case w ^. timeFlow of
|
||||||
NormalTimeFlow -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (newSoundsToPlay u)
|
NormalTimeFlow -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (newSoundsToPlay u)
|
||||||
|
RespawnDelay{} -> playSoundAndUpdate (_soundData $ _preloadData u) (_playingSounds w) (newSoundsToPlay u)
|
||||||
_ -> stopAllSounds >> return M.empty
|
_ -> stopAllSounds >> return M.empty
|
||||||
where
|
where
|
||||||
w = _uvWorld u
|
w = _uvWorld u
|
||||||
|
|||||||
+1
-1
@@ -880,7 +880,7 @@ checkEndGame uv = case w ^? timeFlow . respawnDelay of
|
|||||||
& uvWorld . timeFlow .~ NormalTimeFlow
|
& uvWorld . timeFlow .~ NormalTimeFlow
|
||||||
& uvWorld %~ respawn
|
& uvWorld %~ respawn
|
||||||
Just _ -> uv & uvWorld . timeFlow . respawnDelay -~ 1
|
Just _ -> uv & uvWorld . timeFlow . respawnDelay -~ 1
|
||||||
_ | null (you w ^? crHP . _HP) -> uv & uvWorld . timeFlow .~ RespawnDelay 50
|
_ | null (you w ^? crHP . _HP) -> uv & uvWorld . timeFlow .~ RespawnDelay 100
|
||||||
_ -> uv
|
_ -> uv
|
||||||
where
|
where
|
||||||
w = _uvWorld uv
|
w = _uvWorld uv
|
||||||
|
|||||||
Reference in New Issue
Block a user