Fix terminal shape

This commit is contained in:
2026-04-10 11:19:16 +01:00
parent b197e22de7
commit f19e165571
8 changed files with 36 additions and 31 deletions
+3 -3
View File
@@ -33,16 +33,16 @@ updateCarriage' cid cr w = \case
& tocr . crStance . carriage . zSpeed
%~ if cr ^. crPos . _z < 17 then min 0.05 . (+0.001) else max (-0.05) . subtract 0.001
Boosting {} -> w
Falling {_fallRot = q} ->
Falling {_fallRot = q, _carDir = q'} ->
let v = 0.95 *^ (cr ^. crOldPos - oop & _z -~ 0.5)
ep = cr ^. crPos + v
in if ep ^. _z < 0 && cr ^. crOldPos . _z >= 0 &&
(not (any (pointInPoly (ep ^. _xy)) (w ^. cWorld . chasms))
|| any (uncurry $ crOnSeg cr) (w ^. cWorld . cliffs))
then w & tocr . crPos .~ (ep & _z .~ 0)
& cWorld . lWorld . creatures . ix cid . crStance . carriage .~ OnGround
& cWorld . lWorld . creatures . ix cid . crStance . carriage .~ OnGround q'
else w & cWorld . lWorld . creatures . ix cid . crPos .~ ep
& cWorld . lWorld . creatures . ix cid . crStance . carriage . fallDir *~ q
& cWorld . lWorld . creatures . ix cid . crStance . carriage . carDir *~ q
OnGround {} -> w
& tocr . crPos . _xy +~ 0.8 *^ (cr ^. crOldPos . _xy - oop ^. _xy)