Skip to content

Hearing - Improve and cleanup code#9933

Merged
LinkIsGrim merged 15 commits intomasterfrom
hearing-cache
May 24, 2024
Merged

Hearing - Improve and cleanup code#9933
LinkIsGrim merged 15 commits intomasterfrom
hearing-cache

Conversation

@johnb432
Copy link
Copy Markdown
Contributor

@johnb432 johnb432 commented Apr 7, 2024

When merged this pull request will:

  • Use magazines for determining combat deafness.
  • Use code from ace_gunbag_fnc_isMachineGun to detect if a weapon is a machine gun.
  • Improve the caching by
    • using the magazine name only, as initSpeed relies on the magazine and ammo can't change during play time for a magazine
    • switching to a hashmap
    • making a dedicated function
  • Code cleanup.

I've tested it, but I want someone who uses ACE hearing to also test it, as I don't usually enable ACE hearing.

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@johnb432 johnb432 added the kind/optimization Release Notes: **IMPROVED:** label Apr 7, 2024
Comment thread addons/hearing/functions/fnc_firedNear.sqf Outdated
Comment thread addons/hearing/functions/fnc_addEarPlugs.sqf Outdated
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Comment thread addons/hearing/functions/fnc_addEarPlugs.sqf Outdated
Comment thread addons/hearing/functions/fnc_addEarPlugs.sqf Outdated
Comment thread addons/hearing/functions/fnc_firedNear.sqf Outdated
@johnb432 johnb432 changed the title Hearing - Find used magazine for determining combat deafness Hearing - Improve multiple aspects Apr 24, 2024
@johnb432 johnb432 added the ignore-changelog Release Notes: Excluded label Apr 28, 2024
@johnb432 johnb432 changed the title Hearing - Improve multiple aspects Hearing - Improve and cleanup code Apr 28, 2024
@johnb432 johnb432 marked this pull request as draft April 28, 2024 10:05
@johnb432 johnb432 marked this pull request as ready for review April 28, 2024 16:14
@jonpas jonpas removed the ignore-changelog Release Notes: Excluded label Apr 29, 2024
@johnb432 johnb432 added this to the 3.18.0 milestone May 9, 2024
Comment thread addons/hearing/functions/fnc_addEarPlugs.sqf Outdated
Comment thread addons/hearing/functions/fnc_firedNear.sqf
@LinkIsGrim LinkIsGrim merged commit dc37538 into master May 24, 2024
@LinkIsGrim LinkIsGrim deleted the hearing-cache branch May 24, 2024 23:05
blake8090 pushed a commit to blake8090/ACE3 that referenced this pull request Aug 18, 2024
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/optimization Release Notes: **IMPROVED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants