Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getPedControlState returns true for zoom_out when zooming in, and vice versa #2570

Open
bum8hj opened this issue Mar 12, 2022 · 0 comments · May be fixed by #3467
Open

getPedControlState returns true for zoom_out when zooming in, and vice versa #2570

bum8hj opened this issue Mar 12, 2022 · 0 comments · May be fixed by #3467
Labels
bug Something isn't working

Comments

@bum8hj
Copy link
Contributor

bum8hj commented Mar 12, 2022

Describe the bug
Zoom controls are inverted

  • When zooming in with the sniper, getPedControlState(localPlayer, "zoom_out") returns true.
  • When zooming out with the sniper, getPedControlState(localPlayer, "zoom_in") returns true.

To reproduce
Run this code and try zooming in and out with your sniper.

addEventHandler("onClientRender", root, function()
    dxDrawText("zoom_in: " .. (getPedControlState(localPlayer, "zoom_in") and "true" or "-"), 500, 500)
    dxDrawText("zoom_out: " .. (getPedControlState(localPlayer, "zoom_out") and "true" or "-"), 500, 515)
end)

Expected behaviour
When zooming in, getPedControlState(localPlayer, "zoom_in") should return true, and vice versa.

Video
https://github.com/multitheftauto/mtasa-blue/assets/27828549/3b0d3b09-b270-4fc3-a7d8-6111e9147c25
(mirror: https://i.imgur.com/YTkWL7n.mp4)

Version

  • Server & Client v1.5.9-release-21135
  • Windows 11 (if relevant)

Additional context
Somewhat off-topic, but I think neither of the zoom controls should return true if we use the scroll wheel when we're not aiming. Like when switching weapons, etc.
Edit: probably related to issue #2275

@bum8hj bum8hj added the bug Something isn't working label Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant