Improve mouse click rotation

This commit is contained in:
2026-03-24 11:46:36 +00:00
parent 32f1740577
commit 5b297643db
4 changed files with 9 additions and 1 deletions
+2
View File
@@ -208,7 +208,9 @@ rotateCamera cfig w
angleBetween (w ^. input . mousePos)
<$> (w ^. input . heldPos . at SDL.ButtonRight) =
w & wCam . camRot -~ rotation
& input . inputMemory .~ WasMouseGameRotating
| _gameplay_rotate_to_wall cfig
, WasNotMouseGameRotating <- w ^. input . inputMemory
, isNothing $ w ^? input . mouseButtons . ix SDL.ButtonRight =
rotateToOverlappingWall w
| otherwise = w
+1 -1
View File
@@ -427,7 +427,7 @@ updateKeysTextInputTerminal tmid u =
updateKeyInGame :: Universe -> Scancode -> Int -> Universe
updateKeyInGame uv sc = \case
0 -> updateInitialPressInGame uv sc
0 -> updateInitialPressInGame uv sc & uvWorld . input . inputMemory .~ WasNotMouseGameRotating
x | x >= 30 -> updateLongPressInGame uv sc
_ -> uv