Restrict hotkey firing to initialpress
This commit is contained in:
@@ -46,7 +46,8 @@ handleHotkeys w
|
||||
| SDL.ScancodeLShift `M.member` _pressedKeys (_input w)
|
||||
|| SDL.ScancodeRShift `M.member` _pressedKeys (_input w) =
|
||||
foldl' tryAssignHotkey w allHotkeys
|
||||
| otherwise = foldl' useHotkey w (M.intersection thehotkeys (w ^. input . pressedKeys))
|
||||
| otherwise = foldl' useHotkey w
|
||||
(M.intersection thehotkeys (M.filter (== InitialPress) (w ^. input . pressedKeys)))
|
||||
where
|
||||
thehotkeys = M.mapKeys hotkeyToScancode $ w ^. cWorld . lWorld . hotkeys
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ module Dodge.HeldUse (
|
||||
) where
|
||||
|
||||
import NewInt
|
||||
import Dodge.Luse
|
||||
import Dodge.Creature.Action.Blink
|
||||
import Dodge.RadarSweep
|
||||
import Color
|
||||
|
||||
Reference in New Issue
Block a user