Add attached/aiming checks on item usage
This commit is contained in:
@@ -58,7 +58,7 @@ translateFloatingCamera theinput cam = fromMaybe cam $ do
|
||||
cam & camCenter +~ thetran
|
||||
& camViewFrom +~ thetran
|
||||
else do
|
||||
a <- (theinput ^. heldPos . at SDL.ButtonRight)
|
||||
a <- theinput ^. heldPos . at SDL.ButtonRight
|
||||
return $ cam & camRot -~ angleBetween (theinput ^. mousePos) a
|
||||
|
||||
translateFloatingCameraKeys :: Input -> Camera -> Camera
|
||||
@@ -93,7 +93,8 @@ moveZoomCamera cfig theinput cr w campos =
|
||||
where
|
||||
mremotepos = do
|
||||
i <- cr ^? crManipulation . manObject . imSelectedItem
|
||||
j <- cr ^? crInv . ix i . itUse . uaParams . apLinkedProjectile . _Just
|
||||
j <- cr ^? crInv . ix i . itUse . uaParams . apProjectiles . ix 0
|
||||
guard $ Just REMOTESCREEN == cr ^? crInv . ix i . itType . ibtAttach
|
||||
w ^? cWorld . lWorld . projectiles . ix j . pjPos
|
||||
docamrot = rotateV (campos ^. camRot)
|
||||
offset = fromMaybe noscopeoffset $ do
|
||||
|
||||
Reference in New Issue
Block a user