Rewinding fixes

This commit is contained in:
2022-02-18 11:45:17 +00:00
parent e74ac9f4c4
commit 9923897fe2
4 changed files with 12 additions and 1 deletions
+6
View File
@@ -46,6 +46,7 @@ updateUniverse u = case _menuLayers u of
functionalUpdate :: Configuration -> World -> World
functionalUpdate cfig w = checkEndGame
. (worldClock +~ 1)
. doRewind
. updateDistortions
. updateCreatureSoundPositions
. ppEvents
@@ -80,6 +81,11 @@ functionalUpdate cfig w = checkEndGame
where
(x,y) = cloudZoneOfPoint $ stripZ $ _clPos cl
doRewind :: World -> World
doRewind w = case _maybeWorld w of
Just' w' -> w'
Nothing' -> w
zoneCreatures :: World -> World
zoneCreatures w = w
& creaturesZone . znObjects .~