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

Dragging - Fix unintended Cargo dependency and improve ragdoll/disconnection handling #9272

Merged
merged 3 commits into from
Jul 22, 2023

Conversation

johnb432
Copy link
Contributor

@johnb432 johnb432 commented Jul 20, 2023

When merged this pull request will:

  1. Makes ace_dragging depend on ace_cargo. There are functions and stringtable entries from ace_cargo that are called, see here, here and here. If ace_dragging isn't supposed to be dependent on ace_cargo, then ace_dragging will need to be adjusted accordingly.
  2. Disconnection detection for units carrying or dragging was done previously with the HandleDisconnect mission EH. In my testing (self-hosted MP) HandleDisconnect fires too late and when trying to read the QGVAR(isCarrying)/QGVAR(isDragging) variables, it just returns false, regardless if a unit if carrying/dragging something or not. This makes it impossible for carried/dragged objects to be dropped properly.
    PlayerDisconnected fires before and therefore makes it possible to drop carried/dragged objects correctly. However, I'm unsure if there are any disadvantages to PlayerDisconnected.
  3. Added a check to FUNC(canDrag) and FUNC(canCarry), where it disables dragging/carrying if a unit is in ragdoll animation. This is to prevent odd behaviour. As it is now, you can try to drag a unit in ragdoll, but they stay in place while you go into the drag animation.

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}.

@LinkIsGrim
Copy link
Contributor

LinkIsGrim commented Jul 22, 2023

If ace_dragging isn't supposed to be dependent on ace_cargo, then ace_dragging will need to be adjusted accordingly.

This wasn't the case until recently. Should be adjusted using conditions. Rest is fine.

@LinkIsGrim LinkIsGrim added the kind/enhancement Release Notes: **IMPROVED:** label Jul 22, 2023
@LinkIsGrim LinkIsGrim added this to the 3.16.0 milestone Jul 22, 2023
@LinkIsGrim LinkIsGrim changed the title Dragging - Improve 3 various aspects of ace_dragging Dragging - Fix unintended Cargo dependency and improve ragdoll/disconnection handling Jul 22, 2023
@LinkIsGrim LinkIsGrim merged commit 9505d4c into acemod:master Jul 22, 2023
4 of 5 checks passed
@johnb432
Copy link
Contributor Author

Nice adjustments and additions @LinkIsGrim !

@jonpas jonpas mentioned this pull request Sep 11, 2023
3 tasks
@johnb432 johnb432 deleted the drag-carry-improvements branch January 14, 2024 22:13
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.

None yet

2 participants