diff --git a/src/Dodge/Creature/State/WalkCycle.hs b/src/Dodge/Creature/State/WalkCycle.hs index 9d8c03438..142ec7f90 100644 --- a/src/Dodge/Creature/State/WalkCycle.hs +++ b/src/Dodge/Creature/State/WalkCycle.hs @@ -26,8 +26,8 @@ updateCarriage' cid cr w = \case (chooseFootSound ff) Nothing & over (cWorld . lWorld . creatures . ix cid . crType) resetStride - & tocr . crPos +~ 0.5 *^ (cr ^. crOldPos - oop) - _ -> w & tocr . crPos +~ 0.5 *^ (cr ^. crOldPos - oop) + & tocr . crPos . _xy +~ 0.5 *^ (cr ^. crOldPos - oop) ^. _xy + _ -> w & tocr . crPos . _xy +~ 0.5 *^ (cr ^. crOldPos - oop) ^. _xy Floating -> w Flying {_zSpeed = dz, _flyInertia = x} -> w & cWorld . lWorld . creatures . ix cid . crPos . _xy +~ x *^ f (cr ^. crOldPos . _xy - oop ^. _xy) diff --git a/src/Dodge/Creature/YourControl.hs b/src/Dodge/Creature/YourControl.hs index e8ea15959..190e3570b 100644 --- a/src/Dodge/Creature/YourControl.hs +++ b/src/Dodge/Creature/YourControl.hs @@ -104,7 +104,10 @@ scancodeToHotkey = \case within wasdMovement should probably be done first -} wasdWithAiming :: World -> Creature -> Creature -wasdWithAiming w cr = wasdAim inp w $ wasdMovement (w ^. cWorld . lWorld) inp cam speed cr +wasdWithAiming w cr + | Walking <- cr ^. crStance . carriage + = wasdAim inp w $ wasdMovement (w ^. cWorld . lWorld) inp cam speed cr + | otherwise = cr where speed = _mvSpeed $ crMvType cr inp = w ^. input