Improve door crushing

This commit is contained in:
2026-03-26 19:21:10 +00:00
parent 31d7a00ecf
commit 01b765300e
10 changed files with 107 additions and 87 deletions
+2 -2
View File
@@ -163,10 +163,10 @@ wlHitPos sp ep = maybe ep ((+ normalize (ep - sp)) . fst) . safeHead . wlsHit sp
wlsHitUnsorted :: Point2 -> Point2 -> World -> [(Point2, Wall)]
wlsHitUnsorted sp ep
| sp == ep = const mempty
| otherwise = overlapSegWalls sp ep . wlsNearSeg sp ep
| otherwise = overlapSegWalls sp ep . IM.elems . wlsNearSeg sp ep
wlsHitRadial :: Point2 -> Float -> World -> [(Point2, Wall)]
wlsHitRadial p r = mapMaybe f . wlsNearCirc p r
wlsHitRadial p r = mapMaybe f . IM.elems . wlsNearCirc p r
where
--f wl = uncurry (intersectSegSeg p (p - r *.* v)) (_wlLine wl) <&> (,wl)
f wl = mhp <&> (,wl)