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

Drop attack targets when switching to a more restrictive stance. #16559

Merged
merged 2 commits into from May 21, 2019

Conversation

@pchote
Copy link
Member

commented May 18, 2019

This PR changes the attack activities to drop the current target when the unit's stance is changed if:

  • The new stance is more restrictive than the previous one
  • The target is not auto-targeted in the new stance
  • The attack was not force-targeted

Fixes #8373.

@pchote pchote added this to the Next Release milestone May 18, 2019

@matjaeck

This comment has been minimized.

Copy link
Contributor

commented May 18, 2019

Something is not right - changing an attacking apc/tank to hold fire stance does not stop the attack.

@matjaeck

This comment has been minimized.

Copy link
Contributor

commented May 18, 2019

The issue only occurs when you target something else than a structure.

@abcdefg30

This comment has been minimized.

Copy link
Member

commented May 19, 2019

Needs a rebase.

@abcdefg30
Copy link
Member

left a comment

Can confirm, this does not work when targeting non-structures.

@pchote

This comment has been minimized.

Copy link
Member Author

commented May 19, 2019

Right. I'd forgotten that ReturnFire and HoldFire restrictions were hardcoded instead of relying on conditional AutoTargetPrioritys, and this wasn't visible with my testing against buildings. Fixed by adding an extra check to HasValidTargetPriority and rebased.

Code changed

@pchote pchote force-pushed the pchote:drop-stance-target branch from 0d4224e to 4b1bd16 May 19, 2019

@matjaeck
Copy link
Contributor

left a comment

Tested in RA and looks good from the ingame perspective 👍

@abcdefg30 abcdefg30 merged commit 3ca9d4b into OpenRA:bleed May 21, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abcdefg30

This comment has been minimized.

Copy link
Member

commented May 21, 2019

Changelog

@pchote pchote deleted the pchote:drop-stance-target branch Aug 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.