This commit is contained in:
2022-06-26 02:30:17 +01:00
parent 7532c4cafb
commit ee9523dabb
8 changed files with 83 additions and 172 deletions
+3 -1
View File
@@ -40,12 +40,14 @@ colCrWall w c
--c' = c & crPos %~ pushOutFromWalls' rad (reverse ls)
c' = c & crPos %~ pushOutFromCorners rad ls'
. pushOutFromWalls rad ls'
. flip (collidePointWalls' p1) wls -- check push throughs
. fst . flip (collidePoint p1) wls' -- check push throughs
-- . flip (collidePointWalls' p1) wls -- check push throughs
rad = _crRad c + wallBuffer
p1 = _crOldPos c
p2 = _crPos c
ls = _wlLine <$> wls
ls' = filter (uncurry $ isLHS p1) ls
wls' = S.filter (not . _wlWalkable) $ wallsNearPoint p2 w
wls = runIdentity . S.toList_ . S.filter (not . _wlWalkable) $ wallsNearPoint p2 w
--wallPoints = map fst ls