Commit before static wall change

This commit is contained in:
jgk
2021-04-27 22:01:03 +02:00
parent 6d229f8de2
commit 2085d5a048
9 changed files with 10 additions and 19 deletions
+7 -4
View File
@@ -393,10 +393,13 @@ furthestPointWalkable p1 p2 ws = head $ (sortBy (compare `on` dist p1) $ IM.elem
) ++ [p2]
collidePointIndirect :: Point2 -> Point2 -> IM.IntMap Wall -> Maybe Point2
collidePointIndirect p1 p2 ws = listToMaybe $ sortOn (dist p1) $ IM.elems
$ IM.mapMaybe ( ( \(x:y:_) -> intersectSegSeg' p1 p2 x y)
. _wlLine
) notWindows
{-# INLINE collidePointIndirect #-}
collidePointIndirect p1 p2 ws = listToMaybe
$ sortOn (dist p1)
$ IM.elems
$ IM.mapMaybe ( ( \(x:y:_) -> intersectSegSeg' p1 p2 x y)
. _wlLine
) notWindows
where
notWindows = IM.filter (not . _wlIsSeeThrough) ws