Combine Door and AutoDoor type constructors, add doorPathable field
This commit is contained in:
+1
-3
@@ -386,9 +386,7 @@ collidePointWalkable p1 p2 ws = any (isJust
|
||||
. ( \(x:y:_) -> intersectSegSeg' p1 p2 x y)
|
||||
. _wlLine
|
||||
) unwalkableWalls
|
||||
where unwalkableWalls = IM.filter notDoor ws
|
||||
notDoor (AutoDoor {}) = False
|
||||
notDoor _ = True
|
||||
where unwalkableWalls = IM.filter (fromMaybe True . (^? doorPathable)) ws
|
||||
|
||||
furthestPointWalkable :: Point2 -> Point2 -> IM.IntMap Wall -> Point2
|
||||
furthestPointWalkable p1 p2 ws = head $ (sortBy (compare `on` dist p1) $ IM.elems
|
||||
|
||||
Reference in New Issue
Block a user