Move radar blips into own grouping

This commit is contained in:
2022-07-10 11:52:51 +01:00
parent 8202d12b6a
commit ce5b596d4f
6 changed files with 101 additions and 74 deletions
+6
View File
@@ -5,6 +5,7 @@ Description : Simulation update
-}
module Dodge.Update ( updateUniverse ) where
import Dodge.Data
import Dodge.RadarBlip
import Dodge.Menu
import Dodge.CullBox
--import Dodge.Block
@@ -47,6 +48,7 @@ updateUniverse u = case _menuLayers u of
| otherwise -> u & menuLayers %~ ( (WaitScreen s (i-1) :) . tail )
(OptionScreen {_scOptionFlag = GameOverOptions} : _) -> u & uvWorld %~
( updateParticles
. (radarBlips .~ [])
. updateIMl _props _pjUpdate
. updateLightSources
. updateClouds )
@@ -75,6 +77,7 @@ functionalUpdate cfig w = checkEndGame
. dbArg _worldEvents
. updateIMl _modifications _mdUpdate
. updateParticles
. updateRadarBlips
. updateBeams
. updateIMl _props _pjUpdate
. updateLightSources
@@ -199,6 +202,9 @@ updateLightSources w = over tempLightSources f w
where
f = mapMaybe (\b -> _tlsUpdate b w b)
updateRadarBlips :: World -> World
updateRadarBlips = radarBlips %~ mapMaybe updateRadarBlip
{- Apply internal particle updates, delete 'Nothing's. -}
updateParticles :: World -> World
updateParticles w = updateInstantParticles $ set particles (catMaybes ps) w'