Better check for wall collisions when expanding creature
This commit is contained in:
+2
-1
@@ -367,7 +367,8 @@ collidePointCrsWithoutPoint cid p1 p2 w
|
||||
$ _creatures w
|
||||
where
|
||||
f (cID,(p,_)) = (p,cID)
|
||||
{- | Test if a circle collides with any wall. -}
|
||||
{- | Test if a circle collides with any wall.
|
||||
- Note no check on whether the wall is walkable. -}
|
||||
circOnSomeWall :: Point2 -> Float -> World -> Bool
|
||||
circOnSomeWall p rad w
|
||||
= any (\(x,y) -> circOnSeg x y p rad)
|
||||
|
||||
Reference in New Issue
Block a user