Improve chasm falls, add ear clipping

This commit is contained in:
2026-03-23 19:35:07 +00:00
parent 505ced95bb
commit daba012e83
3 changed files with 33 additions and 11 deletions
+4 -2
View File
@@ -150,7 +150,8 @@ chasmTestLiving cr w
where
tocr = cWorld . lWorld . creatures . ix (_crID cr)
g = uncurry $ circOnSeg (cr ^. crPos . _xy) (crRad $ cr ^. crType)
f = circInPolygon (cr ^. crPos . _xy) (crRad $ cr ^. crType)
--f = circInPolygon (cr ^. crPos . _xy) (crRad $ cr ^. crType)
f = pointInPoly (cr ^. crPos . _xy)
chasmTestCorpse :: Creature -> World -> World
chasmTestCorpse cr w
@@ -168,7 +169,8 @@ chasmTestCorpse cr w
where
tocr = cWorld . lWorld . creatures . ix (_crID cr)
g = uncurry $ circOnSeg (cr ^. crPos . _xy) (crRad $ cr ^. crType)
f = circInPolygon (cr ^. crPos . _xy) (crRad $ cr ^. crType)
--f = circInPolygon (cr ^. crPos . _xy) (crRad $ cr ^. crType)
f = pointInPoly (cr ^. crPos . _xy)
chasmRotate :: Creature -> Point2 -> World -> World
chasmRotate cr v w
+2 -2
View File
@@ -238,8 +238,8 @@ sqPlatformChasm b a =
sqSpitChasm :: Float -> Float -> ([[Point2]], [[Point2]])
sqSpitChasm b a =
( --[[ibr, obr, otr, itr], [itr, otr, otl, itl], [itl, otl, obl, ibl]]
convexPartition clfs
( [[ibr, obr, otr, itr], [itr, otr, otl, itl], [itl, otl, obl, ibl]]
-- ( earClip clfs
, [clfs]
)
where