Allow more general detection of item use focus
This commit is contained in:
@@ -149,7 +149,7 @@ overlapCircWalls p r = mapMaybe dointersect
|
||||
circHitWall :: Point2 -> Point2 -> Float -> World -> Bool
|
||||
circHitWall sp ep r w = any (uncurry (intersectSegSegTest sp ep) . _wlLine)
|
||||
(wlsNearSeg sp ep w)
|
||||
|| any (uncurry (circOnSeg ep r) . _wlLine) (wlsNearPoint ep w)
|
||||
|| circOnSomeWall ep r w
|
||||
|
||||
-- | note that this does not push the circle away from the wall at all
|
||||
collideCircWalls :: Point2 -> Point2 -> Float -> [Wall] -> (Point2, Maybe Wall)
|
||||
@@ -190,11 +190,6 @@ circOnSomeWall p rad =
|
||||
any (uncurry (circOnSeg p rad) . _wlLine)
|
||||
. wlsNearPoint p
|
||||
|
||||
--circOnSomeWall :: Point2 -> Float -> World -> Bool
|
||||
--{-# INLINE circOnSomeWall #-}
|
||||
--circOnSomeWall p rad = runIdentity . S.any_ (uncurry (circOnSeg p rad) . _wlLine)
|
||||
-- . wlsNearPoint p
|
||||
|
||||
circOnAnyCr :: Point2 -> Float -> World -> Bool
|
||||
{-# INLINE circOnAnyCr #-}
|
||||
circOnAnyCr p r w = IS.foldr f False $ crIXsNearPoint p w
|
||||
|
||||
Reference in New Issue
Block a user