Remove wall corner collision test for creatures
This commit is contained in:
+2
-2
@@ -169,7 +169,7 @@ circOnSegNoEndpoints :: Point2 -> Point2 -> Point2 -> Float -> Bool
|
||||
{-# INLINE circOnSegNoEndpoints #-}
|
||||
circOnSegNoEndpoints !p1 !p2 !c !rad = isJustTrue (fmap (\p -> magV (p -.- c) < rad) y)
|
||||
where
|
||||
y = intersectSegLine' p1 p2 c (c +.+ vNormal (p1 -.- p2))
|
||||
y = intersectSegLine p1 p2 c (c +.+ vNormal (p1 -.- p2))
|
||||
isJustTrue (Just True) = True
|
||||
isJustTrue _ = False
|
||||
-- | Test whether a circle is on a segment by intersecting a normal and testing
|
||||
@@ -179,7 +179,7 @@ circOnSeg :: Point2 -> Point2 -> Point2 -> Float -> Bool
|
||||
circOnSeg !p1 !p2 !c !rad = magV (p1 -.- c) <= rad || magV (p2 -.- c) <= rad
|
||||
|| isJustTrue (fmap (\p -> magV (p -.- c) < rad) y)
|
||||
where
|
||||
y = intersectSegLine' p1 p2 c (c +.+ vNormal (p1 -.- p2))
|
||||
y = intersectSegLine p1 p2 c (c +.+ vNormal (p1 -.- p2))
|
||||
isJustTrue (Just True) = True
|
||||
isJustTrue _ = False
|
||||
-- | Find the difference between two Nums.
|
||||
|
||||
Reference in New Issue
Block a user