Cleanup, move towards unifying zones
This commit is contained in:
+5
-3
@@ -7,10 +7,11 @@ module Dodge.Update
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Menu
|
||||
import Dodge.Zone.Data
|
||||
import Dodge.World.Trigger.Data
|
||||
--import Dodge.Config.Data
|
||||
import Dodge.Base
|
||||
import Dodge.Base.Zone
|
||||
import Dodge.Zone
|
||||
import Dodge.WallCreatureCollisions
|
||||
import Dodge.LevelGen.Block
|
||||
import Dodge.Update.Camera
|
||||
@@ -76,12 +77,13 @@ functionalUpdate w = case _menuLayers w of
|
||||
. updateSoundQueue
|
||||
$ updateCloseObjects w
|
||||
where
|
||||
zoneCreatures = set creaturesZone (IM.foldl' (flip creatureInZone) IM.empty (_creatures w))
|
||||
zoneCreatures = set (creaturesZone . znObjects)
|
||||
(IM.foldl' (flip creatureInZone) IM.empty (_creatures w))
|
||||
creatureInZone cr = insertIMInZone x y cid cr
|
||||
where
|
||||
(x,y) = crZoneOfPoint $ _crPos cr
|
||||
cid = _crID cr
|
||||
zoneClouds = set cloudsZone (foldl' (flip cloudInZone) IM.empty (_clouds w))
|
||||
zoneClouds = set (cloudsZone . znObjects) (foldl' (flip cloudInZone) IM.empty (_clouds w))
|
||||
cloudInZone cl = insertInZoneWith x y (++) [cl]
|
||||
where
|
||||
(x,y) = cloudZoneOfPoint $ stripZ $ _clPos cl
|
||||
|
||||
Reference in New Issue
Block a user