Fix terminal shape
This commit is contained in:
@@ -187,7 +187,7 @@ crabFeet _ cr =
|
||||
f p q = q + 2 *^ (p - q)
|
||||
cdir = -cr ^. crDir
|
||||
cxy = cr ^. crPos . _xy
|
||||
afoot = upperPrismPolyST 10 $ polyCirc 3 2
|
||||
afoot = upperPrismPolyHalfST 10 $ polyCirc 3 2
|
||||
(r1,r2) = spiderJoint (0 & _xy .~ rpos) (V3 0 2 5)
|
||||
rpos' = f (V2 0 10) rpos
|
||||
(r1',r2') = spiderJoint (0 & _xy .~ rpos') (V3 0 2 5)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -55,9 +55,8 @@ updateLivingCreature cr =
|
||||
ChaseCrit{} -> \w ->
|
||||
crUpdate cid . performActions cid $
|
||||
over (cWorld . lWorld . creatures . ix cid) (chaseCritInternal w) w
|
||||
CrabCrit{} -> \w ->
|
||||
crUpdate cid . performActions cid $
|
||||
crabCritInternal cid w
|
||||
CrabCrit{} ->
|
||||
crUpdate cid . performActions cid . crabCritInternal cid
|
||||
AutoCrit {} -> crUpdate cid
|
||||
SwarmCrit {} -> crUpdate cid
|
||||
HoverCrit {} -> \w ->
|
||||
@@ -129,7 +128,7 @@ startDeathTimer cr = cr
|
||||
toDeathCarriage :: Carriage -> Carriage
|
||||
toDeathCarriage = \case
|
||||
Flying {} -> Falling Q.qid Q.qid
|
||||
Walking -> OnGround
|
||||
Walking -> OnGround Q.qid
|
||||
_ -> Falling Q.qid Q.qid
|
||||
|
||||
-- could look at the amount of damage here (given by maxDamage) too
|
||||
|
||||
Reference in New Issue
Block a user