testing keycode remapping

This commit is contained in:
Ross
2021-03-21 17:49:42 +00:00
parent 4a0546ab3f
commit 3cfbf3dacc
5 changed files with 24 additions and 3 deletions
+2 -1
View File
@@ -1890,7 +1890,7 @@ yourControl :: World -> (World -> World,StdGen) -> Creature -> ((World -> World,
yourControl w (f,g) cr = ( (mouseActionsWorld (_mouseButtons w) . f, g)
, Just $ mouseActionsCr (_mouseButtons w) $ wasdWithAiming w speed strafeSpeed 0 cr
)
where strafeSpeed = 3 * equipFactor * (fromMaybe 1 $ yourItem w ^? itAimingSpeed)
where strafeSpeed = 8 * equipFactor * (fromMaybe 1 $ yourItem w ^? itAimingSpeed)
speed = 3 * equipFactor
equipFactor = product $ map equipSpeed $ IM.elems $ _crInv $ _creatures w IM.! 0
@@ -1948,6 +1948,7 @@ wasdWithAiming w speed aimSpeed i cr
*.* rotateV (_cameraRot w) (_mousePos w)
_ -> normalizeAngle $ argV (_mousePos w) + _cameraRot w
wasdM :: SDL.Keycode -> Point2
wasdM SDL.KeycodeW = (0,1)
wasdM SDL.KeycodeS = (0,-1)