Improve forcefield visuals

This commit is contained in:
2022-06-07 18:22:43 +01:00
parent 52488b251b
commit 956ee87168
10 changed files with 76 additions and 19 deletions
+1 -2
View File
@@ -399,7 +399,7 @@ crCrSpring c1 c2 w
{- Finds the visible walls from a point to another point. -}
visibleWalls :: Point2 -> Point2 -> IM.IntMap Wall -> [Wall]
visibleWalls p1 p2 ws
= takeUntil isOpaque
= takeUntil wlIsOpaque
. map snd
. sortOn (dist p1 . fromJust . fst)
. filter (isJust . fst)
@@ -407,7 +407,6 @@ visibleWalls p1 p2 ws
$ IM.elems ws
where
f wl = (uncurry intersectSegSeg (_wlLine wl) p1 p2, wl)
isOpaque wl = _wlOpacity wl == Opaque
updateDelayedEvents :: World -> World
updateDelayedEvents w = let (neww,newde) = mapAccumR f w (_delayedEvents w)