From 9e42bb41174daceced07951d4bb6044f531ebb4f Mon Sep 17 00:00:00 2001 From: justin Date: Thu, 26 Mar 2026 20:32:52 +0000 Subject: [PATCH] Cleanup --- src/Dodge/WallCreatureCollisions.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Dodge/WallCreatureCollisions.hs b/src/Dodge/WallCreatureCollisions.hs index 98b5f4e0c..b701bb50f 100644 --- a/src/Dodge/WallCreatureCollisions.hs +++ b/src/Dodge/WallCreatureCollisions.hs @@ -47,7 +47,7 @@ pushCr wls cr & crPos . _xy .~ ap | otherwise = ecr where - stwls = IM.filter (\wl -> uncurry circOnSegNoEndpoints (wl ^. wlLine) sp r) wls +-- stwls = IM.filter (\wl -> uncurry circOnSegNoEndpoints (wl ^. wlLine) sp r) wls twls = IM.elems $ IM.restrictKeys wls (ecr ^. crWallTouch) -- `IM.union` stwls ep = ecr ^. crPos . _xy ap = cr ^. crOldPos . _xy @@ -63,12 +63,9 @@ wlsCrush [] = False wlsCrush (x:xs) = any (wlWlCrush x) xs || wlsCrush xs wlWlCrush :: Wall -> Wall -> Bool -wlWlCrush w1 w2 = norm (f w1 + f w2) < 0.5 +wlWlCrush w1 w2 = norm (f w1 + f w2) < 0.2 where f = normalizeV . uncurry (-) . (^. wlLine) ---wlWlCrush w1 w2 = angleVV (f w1) (f w2) > 0.75 * pi --- where --- f = uncurry (-) . (^. wlLine) -- the amount to push creatures out from walls, extra to their radius wallBuffer :: Float