Vdauphin / HeartsAndMinds

:heart::brain: 1.24.1 is out! 🎉
http://vdauphin.github.io/HeartsAndMinds/
110 stars 65 forks source link

Chemical detector not working with "watchToggle" action #1394

Closed SkippieDippie closed 1 year ago

SkippieDippie commented 1 year ago

Arma 3 Version: 2.08 stable CBA Version: 3.15.7 stable ACE3 Version: 3.15.0 stable Hearts and minds Version: 1.22.4 stable

Mods:

- CBA_A3
- ace

Description: It's in the name. If a user is not triggering the "watch" input action, but still makes the detector appear with "watchToggle" the detector will not update the threat level. However, this bug only occurs if the "Watch" and "Watch (Toggle)" keybinds are not assigned to the same key. So the default "Watch - O" and "Watch (Toggle) - Ox2" will not trigger the issue and will work as intended. Same with "Watch - H" and "Watch (Toggle) - Hx2". But "Watch - O" and "Watch (Toggle) - *[NUM]" for example will not work and will trigger the bug. Same with "Watch - Unassigned" and "Watch (Toggle) - O"

This can be fixed by going to the line 29 of the file core\fnc\chem\ehDetector.sqf and changing the _key in actionKeys "Watch" to (_key in actionKeys "Watch" || _key in actionKeys "WatchToggle").

I hope this helps.

Steps to reproduce:

  1. Unassign the "Watch" keybind OR assign the "Watch (Toggle)" to a key other (important) than the "Watch"
  2. Try using the detector with "Watch (Toggle)" keybind

Picture of the detector when using the "Watch (Toggle)" keybind image Picture of the same detector when using the "Watch" keybind image

Add mission file: =BTC=co@30_Hearts_and_Minds.Altis.pbo.zip

RPT log file: Arma3_x64_2022-08-12_01-36-55.txt

Vdauphin commented 1 year ago

Hello,

Can you make the pull request?

Cheers

SkippieDippie commented 1 year ago

Sure, I can try. Sorry for the late reply.

SkippieDippie commented 1 year ago

The pull request has been drafted.