Refactor wall zoning, remove streaming
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
module Dodge.Block where
|
||||
import Dodge.Zoning.Wall
|
||||
import Dodge.Data
|
||||
import Dodge.Base.Collide
|
||||
import Dodge.Material.Sound
|
||||
@@ -65,7 +66,7 @@ maybeClearPaths ps w = foldl' maybeClearPath w ps
|
||||
|
||||
maybeClearPath :: World -> (Int,Int,PathEdge) -> World
|
||||
maybeClearPath w (x,y,pe)
|
||||
| runIdentity . S.any_ (const True) $ overlapSegWalls (_peStart pe) (_peEnd pe) $ wlsNearSeg (_peStart pe) (_peEnd pe) w
|
||||
| not . null $ overlapSegWalls (_peStart pe) (_peEnd pe) $ wlsNearSeg (_peStart pe) (_peEnd pe) w
|
||||
= w
|
||||
| otherwise = w & pathGraph %~ FGL.insEdge (x,y,pe & peObstacles .~ mempty) . FGL.delEdge (x,y)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user