Commit before pushing more input events into update

This commit is contained in:
2022-10-29 22:33:10 +01:00
parent afaef480db
commit e3155752ba
36 changed files with 121 additions and 147 deletions
+4 -4
View File
@@ -57,12 +57,12 @@ wasdWithAiming w speed cr
| otherwise = crMvAbsolute (speed *.* movAbs) . set crMvDir dir
theTurn cr' = creatureTurnTowardDir (_crMvDir cr') 0.2 cr'
movDir = wasdDir w
dir = (w ^. cWorld . lWorld . camPos . camRot) + argV movDir
movAbs = rotateV (w ^. cWorld . lWorld . camPos . camRot) $ normalizeV movDir
dir = (w ^. cWorld . camPos . camRot) + argV movDir
movAbs = rotateV (w ^. cWorld . camPos . camRot) $ normalizeV movDir
isAiming = _posture (_crStance cr) == Aiming
mouseDir = case cr ^? crInv . ix (crSel cr) . itScope . scopePos of
Just _ -> argV $ mouseWorldPos (w ^. input) (w ^. cWorld . lWorld . camPos) -.- _crPos cr
_ -> argV (_mousePos (_input w)) + (w ^. cWorld . lWorld . camPos . camRot)
Just _ -> argV $ mouseWorldPos (w ^. input) (w ^. cWorld . camPos) -.- _crPos cr
_ -> argV (_mousePos (_input w)) + (w ^. cWorld . camPos . camRot)
wasdM :: SDL.Scancode -> Point2
wasdM scancode = case scancode of