Fix aim sweep
This commit is contained in:
+11
-4
@@ -323,13 +323,20 @@ updateMouseContextGame cfig u = case u ^. uvWorld . input . mouseContext of
|
||||
OverInvDragSelect{} -> u
|
||||
_ ->
|
||||
u & uvWorld . input . mouseContext
|
||||
.~ fromMaybe aimcontext (overinv <|> overcomb <|> overterm)
|
||||
-- .~ fromMaybe aimcontext (overinv <|> overcomb <|> overterm)
|
||||
-- .~ fromMaybe aimcontext (overinv <|> overcomb <|> overterm <|> isrotatedrag)
|
||||
.~ fromMaybe aimcontext (isrotatedrag <|> overinv <|> overcomb <|> overterm)
|
||||
where
|
||||
w = u ^. uvWorld
|
||||
isrotatedrag = do
|
||||
t1 <- w ^. input . mouseButtons . at ButtonLeft
|
||||
t2 <- w ^. input . mouseButtons . at ButtonRight
|
||||
guard $ t1 > t2
|
||||
return MouseGameRotate
|
||||
aimcontext
|
||||
| Just t1 <- w ^. input . mouseButtons . at ButtonLeft
|
||||
, Just t2 <- w ^. input . mouseButtons . at ButtonRight
|
||||
, t1 > t2 = MouseGameRotate
|
||||
-- | Just t1 <- w ^. input . mouseButtons . at ButtonLeft
|
||||
-- , Just t2 <- w ^. input . mouseButtons . at ButtonRight
|
||||
-- , t1 > t2 = MouseGameRotate
|
||||
| ButtonRight `M.member` (w ^. input . mouseButtons) = MouseAiming
|
||||
| otherwise = MouseInGame
|
||||
mpos = w ^. input . mousePos
|
||||
|
||||
Reference in New Issue
Block a user