Zone creatures

This commit is contained in:
2022-06-28 11:20:20 +01:00
parent f0a1e0685a
commit 61ad58c04a
10 changed files with 75 additions and 106 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ crsHit sp ep
| otherwise = sortStreamOn (dist sp . fst)
. S.mapMaybe
(\cr -> (, cr) <$> listToMaybe (intersectCircSeg (_crPos cr) (_crRad cr) sp ep))
. S.each
. _creatures
-- . S.each . _creatures
. crsNearSeg sp ep
thingHit :: Point2 -> Point2 -> World -> Maybe (Point2, Either Creature Wall)
thingHit sp ep = runIdentity . S.head_ . thingsHit sp ep