Test aggressive object culling

This commit is contained in:
2022-06-17 20:14:47 +01:00
parent f365f18ee8
commit 261bb0bb6b
11 changed files with 38 additions and 16 deletions
+5
View File
@@ -5,6 +5,7 @@ Description : Simulation update
module Dodge.Update ( updateUniverse ) where
import Dodge.Data
import Dodge.Menu
import Dodge.CullBox
import Dodge.Block
import Dodge.Distortion
import Dodge.SoundLogic
@@ -84,6 +85,7 @@ functionalUpdate cfig w = checkEndGame
-- . (youHammerPosition %~ moveHammerUp)
. updateTerminal
. updateRBList
. updateBoundBox cfig -- where should this go? next to update camera?
$ updateCloseObjects w
where
--updatedLightSources = mapMaybe (\b -> _tlsUpdate b w b) $ _tempLightSources w
@@ -92,6 +94,9 @@ functionalUpdate cfig w = checkEndGame
where
(x,y) = cloudZoneOfPoint $ stripZ $ _clPos cl
updateBoundBox :: Configuration -> World -> World
updateBoundBox cfig w = w & boundBox .~ cullBox cfig w
mcChooseUpdate :: Machine -> Machine -> World -> World
mcChooseUpdate mc mc'
| _mcHP mc > 0 = _mcUpdate mc mc'