Count mouse button press time up from 0

This commit is contained in:
2023-04-27 11:39:42 +01:00
parent 9972e0fdea
commit 5b1212e4f6
6 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ itemEffect cr it w = case it ^. itUse of
tryReload :: Creature -> Item -> Input -> (World -> World) -> World -> World
tryReload cr it theinput f
| cid == 0 && itNeedsLoading it && _mouseButtons theinput M.!? SDL.ButtonLeft == Just 1 =
| cid == 0 && itNeedsLoading it && _mouseButtons theinput M.!? SDL.ButtonLeft == Just 0 =
cWorld . lWorld . creatures . ix cid %~ crToggleReloading
| otherwise =
(runIdentity . pointerToItemLocation (_itLocation it) (return . (itUse . heldHammer .~ HammerDown)))