Simplify creature stride length

This commit is contained in:
2026-04-01 20:46:48 +01:00
parent 735cc8d92d
commit c2de804fa9
8 changed files with 85 additions and 80 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
module Dodge.Creature.State.WalkCycle (updateWalkCycle) where
import Dodge.Creature.HandPos
import Linear
import Control.Lens
import Dodge.Data.World
@@ -12,7 +13,7 @@ updateWalkCycle :: Int -> World -> World
updateWalkCycle cid w
| Just cr <- w ^? cWorld . lWorld . creatures . ix cid
, Walking x ff <- cr ^. crStance . carriage
, x >= cr ^. crStance . strideLength =
, x >= strideLength cr =
w
& soundMultiFrom
[FootstepSound i | i <- [0 .. 10]]