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

Stop sounds when removing pawns #1203

Merged
merged 3 commits into from
Aug 13, 2023
Merged

Conversation

Tedster59
Copy link
Contributor

@Tedster59 Tedster59 commented Jun 23, 2023

Fixes #1192

Remove sounds by updating DestroyPawns to call StopSounds() and Cosmetic Pawns from units by updating ReleasePawnInternal to grab and also remove the Cosmetic Pawn. Addresses issue #1192 based on Rusty's code.

@Iridar
Copy link
Contributor

Iridar commented Jun 24, 2023

If the first message in the PR has something like "Closes #1192" or "Fixes #1192", then the corresponding issue will be closed automatically when the PR is merged, so do that in the future, please. I've edited the post for you for now.

@Iridar Iridar added the ready-to-review A pull request is ready to be reviewed label Jun 24, 2023
@Iridar Iridar added this to the 1.26.0 milestone Jun 24, 2023
@Iridar Iridar changed the title Update UIPawnMgr to address issue #1192 Stop sounds and remove cosmetic units when removing pawns Jun 29, 2023
remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal
@Iridar
Copy link
Contributor

Iridar commented Aug 10, 2023

This generally looks like it should work, but it assumes the cosmetic unit comes from the secondary weapon slot. Do you think you can adjust the PR so it works regardless of slots?

@Iridar Iridar added waiting-on-author A pull request is waiting on changes from the author and removed ready-to-review A pull request is ready to be reviewed labels Aug 10, 2023
@Tedster59
Copy link
Contributor Author

Reworked this to loop over the attached units on the main pawn using its XCGS_Unit. Also updated the documentation to better fit HL-Docs formatting.

@Tedster59 Tedster59 added ready-to-review A pull request is ready to be reviewed and removed waiting-on-author A pull request is waiting on changes from the author labels Aug 11, 2023
remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal

Revise cosmetic pawn removal to not assume inventory slot

Now loops over all cosmetic pawns on the associated UnitState instead of attempting to remove a pawn from the secondary slot.

remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal

Remove code for cosmetic pawn issue

remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal

Revise cosmetic pawn removal to not assume inventory slot

Now loops over all cosmetic pawns on the associated UnitState instead of attempting to remove a pawn from the secondary slot.

remove sounds and Cosmetic Pawns from units by updating ReleasePawnInternal

Update UIPawnMgr.uc
@Tedster59 Tedster59 changed the title Stop sounds and remove cosmetic units when removing pawns Stop sounds when removing pawns Aug 13, 2023
@Tedster59
Copy link
Contributor Author

Updated PR name to only address the stop sounds part, going to move the cosmetic stuff to a separate fix.

@Iridar Iridar merged commit 5abffb3 into X2CommunityCore:master Aug 13, 2023
4 checks passed
@Iridar Iridar added ready-for-merge the pull request was reviewed and is ready to be merged. and removed ready-to-review A pull request is ready to be reviewed labels Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-basegame ready-for-merge the pull request was reviewed and is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UIArmory.uc does not stop sounds or remove cosmetic units when removing pawns.
2 participants