Fix aim sweep
This commit is contained in:
@@ -122,11 +122,11 @@ wasdAim inp cam cr
|
||||
| Just 0 <- inp ^? mouseButtons . ix SDL.ButtonRight
|
||||
, Nothing <- inp ^? mouseButtons . ix SDL.ButtonLeft
|
||||
= setAimPosture cr
|
||||
| SDL.ButtonRight `M.member` _mouseButtons inp = aimTurn mouseDir cr
|
||||
| SDL.ButtonRight `M.member` _mouseButtons inp = aimTurn mousedir cr
|
||||
| Aiming <- cr ^. crStance . posture = removeAimPosture cr
|
||||
| otherwise = creatureTurnTowardDir (_crMvAim cr) 0.2 cr
|
||||
where
|
||||
mouseDir = argV $ mouseWorldPos inp cam - (cr ^. crPos)
|
||||
mousedir = argV $ mouseWorldPos inp cam - (cr ^. crPos)
|
||||
|
||||
setAimPosture :: Creature -> Creature
|
||||
setAimPosture = (crStance . posture .~ Aiming) . doAimTwist (- twoHandTwistAmount)
|
||||
|
||||
Reference in New Issue
Block a user