diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index 88f8ac4..04ba5f6 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -86,7 +86,7 @@ loadMapFork ud ad future progress = do fc = FloorConfig (V2 10 10) [(V2 5 5), (V2 5 20)] - (75, 50) + (50, 50) modifyMVar_ progress (return . (\(p, _) -> ( p + increment , "Building floor" diff --git a/src/Util.hs b/src/Util.hs index 2e8ede0..fc236b3 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -164,7 +164,7 @@ naviGraph imgmat animBounds (V2 r c) = (\acc (rr, cc) -> if null (maybe [] collisionObstacle - (fromMaybe Nothing $ M.safeGet (r + rr) (c + cc) imgmat) ++ + (M.safeGet (r + rr) (c + cc) imgmat) ++ map snd (filter (\(V2 br bc, _) -> floor br == r + rr && floor bc == c + cc) animBounds)) @@ -177,15 +177,14 @@ naviGraph imgmat animBounds (V2 r c) = foldl (\acc (rr, cc) -> if null - (maybe [] collisionObstacle - (fromMaybe Nothing $ M.safeGet (r + rr) (c + cc) imgmat) ++ - map snd (filter - (\(V2 br bc, _) -> floor br == r + rr && floor bc == c + cc) - animBounds)) + (maybe [] (collisionObstacle <$>) + ([M.safeGet (r + rr) (c + cc) imgmat] ++ + map snd (filter (\(V2 br bc, _) -> floor br == r + rr && floor bc == c + cc) + animBounds))) && all null (map (\(oor, ooc) -> (maybe [] collisionObstacle - (fromMaybe Nothing $ M.safeGet (r + oor) (c + ooc) imgmat)) ++ + (M.safeGet (r + oor) (c + ooc) imgmat)) ++ map snd (filter (\(V2 br bc, _) -> floor br == r + oor && floor bc == c + ooc) animBounds))