Single source of truth for wall pathing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user