Improve falling, remove stride advance while falling

This commit is contained in:
2026-04-03 21:25:05 +01:00
parent 348a1d7537
commit 615295ca3e
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -372,7 +372,9 @@ updateCreatureStrides :: World -> World
updateCreatureStrides = cWorld . lWorld . creatures . each %~ updateCreatureStride
updateCreatureStride :: Creature -> Creature
updateCreatureStride cr = cr & crType . strideAmount +~ d
updateCreatureStride cr
| Walking <- cr ^. crStance . carriage = cr & crType . strideAmount +~ d
| otherwise = cr
where
s = 2 * fromMaybe 1 (crMvType cr ^? mvSpeed)
-- d = min s . norm $ cr ^. crPos - cr ^. crOldPos