-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
Zoom In/Out key binding fixes #2767
Conversation
This reverts commit fc625b5.
…, also fixes Next/Previous Weapon bindings affecting Zoom In/Out when aiming
I haven't tested your PR yet but I have unbinded all keys (via |
I tried with |
Yeah indeed when I set the mouse scrolling in single player I get a smooth zoom in/out even with everything unbound in MTA. And if I bind mouse scrolling in MTA I get a jerky "double zoom", probably the thing that the hack tried to fix. |
Fix weapon zoom in/out getting affected by single player key bindings. We now hook Direct Input scroll wheel data as the game seems to use this value rather than the windows messaging system to handle zoom.
I found the issue with the scrolling that caused it to be affected by single player. It seems that GTA SA uses Direct Input to get the scroll wheel value when using mouse scroll wheel on zoom. It's probably to have smoother zoom, as now that I have hooked the zoom value on direct input, the single player no longer affects MTA but the scrolling is a bit harsh. |
That mouse wheel zoom logic is defined in |
I suggest to remove that mouse wheel zoom fix and create seperate PR for that instead. Related issues:
Jump bind also triggers zoom in (it doesn't happen in single player). |
This is slightly off-topic, but I believe jumping also forcefully re-enables |
Hello, I reverted the last commit that I will move into a WIP PR that will look into the whole zoom behavior issues (to the best of my abilities). |
I just would like to merge fix for inverted controls first. Please restore that zoom check which MTA used to have (and then remove this condition in your other PR).
Unable to reproduce that. |
…with mouse wheel" This reverts commit b0ed88c.
Done ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you.
I have slighty edited first post.
Resolves #524
Hello,
This is my first contribution to any open source project, tried to follow the guidelines and coding style but I may have missed some things. Don't hesitate to tell me if I did.
Threes fixes are included in this pull request:
Thanks to the fix just above, we can remove a hack that disconnected Zoom In/Out behavior using mouse wheel to try and fix zoom being applied twice. I think it was actually due to the fact that Weapon Previous/Next was applied first (if bound on the scroll wheel) and them Zoom In/Out gets applied and adds another zoom on top of it. With that hack removed, we can now bind mouse scroll wheel for the zoom. On master if you try to bind the scroll wheel only on the zoom in/out, you'll observe that the zoom isn't working.(moved into Fix weapon zoom behavior #2769)Don't mind the first two commits, it was a first try to fix the issue that I reverted after I dug up further and found what I think is a better fix.