Cleanup door mounts, noticed space leak when no debug-display paths

This commit is contained in:
2025-10-25 22:49:37 +01:00
parent cbf0f47b9b
commit 61910785c4
16 changed files with 217550 additions and 864094 deletions
+4
View File
@@ -32,6 +32,9 @@ updateEdgesWall is w = updateEdgesWall'
updateEdgesWall' :: S.Set (Int, Int) -> World -> World
updateEdgesWall' = flip $ foldl' updateEdgeWallObs
--updateEdgeWallObs :: World -> (Int, Int) -> World
--updateEdgeWallObs w (i, j) = w
updateEdgeWallObs :: World -> (Int, Int) -> World
updateEdgeWallObs w (i, j) = fromMaybe w $ do
s <- getNodePos i w
@@ -39,5 +42,6 @@ updateEdgeWallObs w (i, j) = fromMaybe w $ do
let wlflags = foldMap (^. _2 . to getWallPathing) $ wlsHitUnsorted s e w
return $ w & cWorld . incGraph %~ updateEdge (f wlflags) (i, j)
where
-- f x _ = S.map WallObstacle x
f x y = S.map WallObstacle x `S.union`
(y S.\\ (S.fromList $ map WallObstacle [minBound..maxBound]))