Single source of truth for wall pathing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Update.WallDamage (updateWallDamages, updateEdgesWall) where
|
||||
|
||||
import Dodge.Wall.Pathing
|
||||
import Geometry.Data
|
||||
import Control.Lens
|
||||
import Data.Foldable
|
||||
@@ -35,7 +36,8 @@ updateEdgeWallObs :: World -> (Int, Int) -> World
|
||||
updateEdgeWallObs w (i, j) = fromMaybe w $ do
|
||||
s <- getNodePos i w
|
||||
e <- getNodePos j w
|
||||
let wlflags = foldMap (^. _2 . wlPathFlag) $ wlsHitUnsorted s e w
|
||||
--let wlflags = foldMap (^. _2 . wlPathFlag) $ wlsHitUnsorted s e w
|
||||
let wlflags = foldMap (getWallPathing . (^. _2)) $ wlsHitUnsorted s e w
|
||||
return $ w & cWorld . incGraph %~ updateEdge (f wlflags) (i, j)
|
||||
where
|
||||
f x _ = S.map WallObstacle x
|
||||
|
||||
Reference in New Issue
Block a user