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

Interaction - Improve FUNC(switchWeaponAttachment) #10145

Merged
merged 7 commits into from
Aug 9, 2024

Conversation

johnb432
Copy link
Contributor

@johnb432 johnb432 commented Jul 25, 2024

When merged this pull request will:

  • Only play animation if the attachment can be switched.
  • Only play sound if unit is ACE_player (should always be the case, but added as precaution).
  • Raise CBA attachment switched EH.

If we want to remove the delays between switching items, we can probably use #10135.

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/enhancement Release Notes: **IMPROVED:** label Jul 25, 2024
@johnb432 johnb432 added this to the 3.18.0 milestone Jul 25, 2024
* change interact_SWA to use common_SAM

* Directly call

* exit on bad arg

* Update fnc_switchAttachmentMode.sqf

* Minor optimisations

* Cleanup leftover code, use unit instead of target

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
@johnb432 johnb432 merged commit 4db0f7d into master Aug 9, 2024
5 checks passed
@johnb432 johnb432 deleted the interaction-update-switchWeaponAttachment branch August 9, 2024 21:08
blake8090 pushed a commit to blake8090/ACE3 that referenced this pull request Aug 18, 2024
* Improve swtichWeaponAttachment

* change interact_SWA to use common_SAM (acemod#10176)

* change interact_SWA to use common_SAM

* Directly call

* exit on bad arg

* Update fnc_switchAttachmentMode.sqf

* Minor optimisations

* Cleanup leftover code, use unit instead of target

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update addons/interaction/functions/fnc_switchWeaponAttachment.sqf

* Revert some unnecessary changes

* Remove sound, as it was part of the CBA attachment switching & pass missing parameter

* Add sound back, to indicate new attachment

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants