Stop you from having wasd control while falling

This commit is contained in:
2026-04-03 21:14:59 +01:00
parent 30b0bb55c0
commit 348a1d7537
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -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