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

Callback in Passenger during UnloadCargo before re-adding it to the world #21084

Merged
merged 1 commit into from Oct 9, 2023

Conversation

michaeldgg2
Copy link
Contributor

@michaeldgg2 michaeldgg2 commented Sep 29, 2023

This PR adds extension point in Passenger, which is used byUnloadCargo. The callback is called just before adding the Passenger actor back to the world and by default cancels actor's activities (which keeps the original behavior intact).

On the other hand by preserving actor's queued activities, new useful scenarios such as "ride and capture" attacks open up:

  • queue loading engineers (or other capture-capable actors) onto a transporter (Cargo actor)
  • also queue the capture order for the engineers of the target building (or other capturable actor)
  • queue moving the transporter next to target building and queue deploy order

Example usage in OpenE2140 mod (here, any infantry actor can capture buildings):

opene2140_ride_and_capture

This PR also fixes bug, when passenger actor's activities were not canceled, when it was ejected after the Cargo actor was destroyed.

The PR supersedes #21079.

@michaeldgg2
Copy link
Contributor Author

This is GIF of the bug demonstrated in TS:

gif

Copy link
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Virtualisation doesn't hurt here

@PunkPun PunkPun merged commit 12fb091 into OpenRA:bleed Oct 9, 2023
3 checks passed
@michaeldgg2 michaeldgg2 deleted the passenger-callback branch October 28, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants