Stop you from having wasd control while falling
This commit is contained in:
@@ -26,8 +26,8 @@ updateCarriage' cid cr w = \case
|
|||||||
(chooseFootSound ff)
|
(chooseFootSound ff)
|
||||||
Nothing
|
Nothing
|
||||||
& over (cWorld . lWorld . creatures . ix cid . crType) resetStride
|
& over (cWorld . lWorld . creatures . ix cid . crType) resetStride
|
||||||
& tocr . crPos +~ 0.5 *^ (cr ^. crOldPos - oop)
|
& tocr . crPos . _xy +~ 0.5 *^ (cr ^. crOldPos - oop) ^. _xy
|
||||||
_ -> w & tocr . crPos +~ 0.5 *^ (cr ^. crOldPos - oop)
|
_ -> w & tocr . crPos . _xy +~ 0.5 *^ (cr ^. crOldPos - oop) ^. _xy
|
||||||
Floating -> w
|
Floating -> w
|
||||||
Flying {_zSpeed = dz, _flyInertia = x} ->
|
Flying {_zSpeed = dz, _flyInertia = x} ->
|
||||||
w & cWorld . lWorld . creatures . ix cid . crPos . _xy +~ x *^ f (cr ^. crOldPos . _xy - oop ^. _xy)
|
w & cWorld . lWorld . creatures . ix cid . crPos . _xy +~ x *^ f (cr ^. crOldPos . _xy - oop ^. _xy)
|
||||||
|
|||||||
@@ -104,7 +104,10 @@ scancodeToHotkey = \case
|
|||||||
within wasdMovement should probably be done first
|
within wasdMovement should probably be done first
|
||||||
-}
|
-}
|
||||||
wasdWithAiming :: World -> Creature -> Creature
|
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
|
where
|
||||||
speed = _mvSpeed $ crMvType cr
|
speed = _mvSpeed $ crMvType cr
|
||||||
inp = w ^. input
|
inp = w ^. input
|
||||||
|
|||||||
Reference in New Issue
Block a user