Single source of truth for wall pathing

This commit is contained in:
2025-10-24 14:25:19 +01:00
parent 0eeae7e6bc
commit 488428b1ef
19 changed files with 156 additions and 121 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ module Dodge.WorldEvent.ThingsHit (
isWalkable,
) where
import Dodge.Wall.Pathing
import Data.Monoid
import qualified Data.Set as S
import Linear
@@ -163,7 +164,7 @@ isFlyable :: Point2 -> Point2 -> World -> Bool
{-# INLINE isFlyable #-}
isFlyable p1 p2 =
not . (WallNotAutoOpen `S.member`)
. foldMap (^. _2 . wlPathFlag)
. foldMap (getWallPathing . (^. _2))
. wlsHitUnsorted p1 p2
isWalkable :: Point2 -> Point2 -> World -> Bool