Cleanup zoning

This commit is contained in:
2022-06-28 13:43:37 +01:00
parent e770fba7bf
commit 9801a40b9e
14 changed files with 84 additions and 106 deletions
+4 -1
View File
@@ -97,7 +97,10 @@ functionalUpdate cfig w = checkEndGame
$ updateCloseObjects w
where
--updatedLightSources = mapMaybe (\b -> _tlsUpdate b w b) $ _tempLightSources w
zoneClouds = set (cloudsZone . znObjects) (foldl' (flip cloudInZone) IM.empty (_clouds w))
zoneClouds :: World -> World
zoneClouds w = w & set (cloudsZone . znObjects) (foldl' (flip cloudInZone) IM.empty (_clouds w))
where
cloudInZone cl = insertInZoneWith x y (++) [cl]
where
V2 x y = clZoneOfPoint $ stripZ $ _clPos cl