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