Fix terminal shape
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user