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

Fix return fire logic ignoring AutoAttack priotities #20736

Merged

Conversation

Guillermoqnk
Copy link
Contributor

@Guillermoqnk Guillermoqnk commented Mar 10, 2023

Closes #20731

Change when stop order is given:
-When stance is return fire, units keeps retaliating.
-When you change to defense it's keeps retaliating till you give the order.
-Once the order is given it retargets to the closest unit.

If you go back to returnfire it retaliate again.

@Guillermoqnk Guillermoqnk changed the title Added brand new feature Stop retarget the self unit objective when stance is greater than return fire Mar 10, 2023
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.

Thanks for your contribution!

This correctly fixes the bug, but needs a bit more polish. See suggestions below.

OpenRA.Mods.Common/Traits/AutoTarget.cs Outdated Show resolved Hide resolved
OpenRA.Mods.Common/Traits/AutoTarget.cs Outdated Show resolved Hide resolved
@PunkPun
Copy link
Member

PunkPun commented Mar 10, 2023

I propose to name the commit to something like

Fix return fire logic ignoring AutoAttack priotities

@Guillermoqnk Guillermoqnk changed the title Stop retarget the self unit objective when stance is greater than return fire Fix return fire logic ignoring AutoAttack priotities Mar 10, 2023
Added brand new feature

Unnecessary assignmet removed
@Guillermoqnk Guillermoqnk force-pushed the TargetClosestUnitWhenGreaterThanRFStance branch from 34960c7 to 3276731 Compare March 10, 2023 12:40
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.

LGTM 👍

Copy link
Member

@RoosterDragon RoosterDragon left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this one.

As this is your first contribution, you can choose to add yourself to the https://github.com/OpenRA/OpenRA/blob/bleed/AUTHORS file if you wish - just add another commit onto this PR if you do.

@PunkPun PunkPun merged commit b3d468a into OpenRA:bleed Mar 10, 2023
@PunkPun
Copy link
Member

PunkPun commented Mar 10, 2023

Changelog

22f30df

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Targeting can jump to a further target if attacked before a closer target
3 participants