Correctly update root status of item in _ilIsRoot
This commit is contained in:
@@ -114,7 +114,7 @@ wasdAim inp cam cr
|
||||
wasdTwist :: Creature -> Creature
|
||||
wasdTwist cr
|
||||
| _posture (_crStance cr) == Aiming = fromMaybe cr $ do
|
||||
itRef <- cr ^? crManipulation . manObject . imRootItem
|
||||
itRef <- cr ^? crManipulation . manObject . imRootSelectedItem
|
||||
astance <- cr ^? crInv . ix itRef . itUse . heldAim . aimStance
|
||||
case (astance, cr ^. crTwist) of
|
||||
(TwoHandUnder, 0) ->
|
||||
@@ -144,7 +144,7 @@ aimTurn :: Float -> Creature -> Creature
|
||||
aimTurn a cr = creatureTurnTowardDir a (x * 0.2) cr
|
||||
where
|
||||
x = fromMaybe 1 $ do
|
||||
itRef <- cr ^? crManipulation . manObject . imRootItem
|
||||
itRef <- cr ^? crManipulation . manObject . imRootSelectedItem
|
||||
cr ^? crInv . ix itRef . itUse . heldAim . aimTurnSpeed
|
||||
|
||||
{- | Set posture according to mouse presses.
|
||||
|
||||
Reference in New Issue
Block a user