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

"Next/Prev Optics State" Block Vanilla keybinds in some cases if no additional optics state is found #1532

Open
kennedy4273 opened this issue Jan 26, 2022 · 1 comment

Comments

@kennedy4273
Copy link

  • Arma 3: 2.06.148470
  • CBA: 3.15.6

Description:
If the binding for CBA "Next/Prev optics state" is bound to the same binding as the vanilla "Optics Mode," and a scope has no valid additional CBA optics state, it will block the use of the vanilla "Optics Mode" keybind. HOWEVER, the default Ctrl+Right Click will work, even if bound to both. This bug only seems to apply to additional keybinds.

Steps to reproduce:

  • Bind an additional keybind to "Optics Mode" in vanilla and "Next optics state" in CBA (I used "Num /" and "F8" in my testing)
  • Attempt to switch Optics mode on a scope like the RCO using this new keybind.

Expected behavior:
If no valid additional CBA optics states are found, the vanilla keybind should still switch optics modes. Some modded optics use CBA to switch optics states, some use the vanilla bind to switch optics mode. Since both accomplish the same goal (switching between different optics options), a single keybind able to handle both is ideal. Having this be an unused key means you don't have to do Ctrl+Right click, which can cause issues when moving.

Where did the issue occur?
-Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal

Additional context:
When you try to use the keybind it makes the noise as if CBA was trying to switch optics states, but nothing happens.

I also tested with a meme keybind like ' which is the vanilla "Sit Down" keybind. With it not bound in CBA, I switch optics and sit down. With it bound in CBA I hear the click as CBA attempts to change optics state, and then nothing happens, including the character NOT sitting down.

The next thing I tested is if I bound my additional key to a Use Action and bound that in CBA, and then the straight keybind in vanilla. Surprisingly that worked with no issues, so there is some weirdness going on here.

Again, the Left Control+Right Click keybind DOES work even if it's bound in both CBA and vanilla.

@commy2
Copy link
Contributor

commy2 commented Jan 26, 2022

This case maybe should not play a sound and return false.

https://github.com/CBATeam/CBA_A3/blob/master/addons/accessory/fnc_switchAttachment.sqf#L90-L95

Idk why it was chosen to be this way, but it seems scary to change it without good reason, since you likely upset people by changing how their keybinds work.

@commy2 commy2 added Enhancement and removed Bug labels Jan 26, 2022
@CBATeam CBATeam deleted a comment from GoddofCarrots Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants