Non-convex chasms

This commit is contained in:
2026-01-26 10:59:51 +00:00
parent 962df63e62
commit a6976eae8d
11 changed files with 341 additions and 323 deletions
+2 -1
View File
@@ -124,7 +124,8 @@ chasmTest :: Creature -> World -> World
chasmTest cr w
| _crZVel cr < 0 = w & tocr . crZVel -~ 0.5
& tocr . crPos . _z +~ _crZVel cr
| Just (x, y) <- List.find g (foldMap loopPairs $ w ^. cWorld . chasms) = w
-- | Just (x, y) <- List.find g (foldMap loopPairs $ w ^. cWorld . chasms') = w
| Just (x, y) <- List.find g (w ^. cWorld . cliffs) = w
& soundContinue (CrChasm (_crID cr)) (cr ^. crPos . _xy) debrisS (Just 100)
& tocr . crPos . _xy -~ normalizeV (vNormal (x - y))
| any f (w ^. cWorld . chasms) = w & tocr . crZVel -~ 0.5