Add jitter on chase crit bark
This commit is contained in:
@@ -60,7 +60,6 @@ pushCreatureOutFromWalls ls cr = cr & crPos %~ pushOutFromWalls (_crRad cr) ls
|
||||
pushOutFromWalls :: Float -> [(Point2,Point2)] -> Point2 -> Point2
|
||||
pushOutFromWalls rad wls p1 = case (getFirst . foldMap (First . pushOutFromWall rad p1)) wls of
|
||||
Nothing -> p1
|
||||
--Just p2 -> fromMaybe p2 $ (getLast . foldMap (Last . pushOutFromWall rad p2)) wls
|
||||
Just p2 -> pushOutFromWalls rad (tail wls) p2
|
||||
-- possible improvement: choose between the closer of p2 and "p3" to p1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user