Door destruction happens during door update, updates pathing

This commit is contained in:
2025-10-22 22:47:10 +01:00
parent 151c037763
commit 0fd7ba46b5
9 changed files with 145 additions and 198 deletions
+7 -7
View File
@@ -40,13 +40,13 @@ import Linear
getNodePos :: Int -> World -> Maybe Point2
getNodePos i w = w ^? cWorld . incNode . ix i
getEdgesCrossingPoly :: [Point2] -> World -> [(Int,Int)]
getEdgesCrossingPoly ps w = filter tcross $ zonesExtract (w ^. incEdgeZoning)
$ Set.toList $ foldMap (uncurry $ zoneOfSegSet peZoneSize) $ pairs
where
pairs = loopPairs ps
tcross (i,j) = any (isJust . uncurry (intersectSegSeg (f i) (f j))) pairs
f i = w ^?! cWorld . incNode . ix i
--getEdgesCrossingPoly :: [Point2] -> World -> [(Int,Int)]
--getEdgesCrossingPoly ps w = filter tcross $ zonesExtract (w ^. incEdgeZoning)
-- $ Set.toList $ foldMap (uncurry $ zoneOfSegSet peZoneSize) $ pairs
-- where
-- pairs = loopPairs ps
-- tcross (i,j) = any (isJust . uncurry (intersectSegSeg (f i) (f j))) pairs
-- f i = w ^?! cWorld . incNode . ix i
getEdgesCrossing :: Point2 -> Point2 -> World -> [(Int,Int)]
getEdgesCrossing s e w = filter inedgecrosses $ nearSeg peZoneSize _incEdgeZoning s e w