Skip to content

Fix autotarget not checking all attack traits for targets#21452

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
cameo-mod:autotarget
Jun 17, 2024
Merged

Fix autotarget not checking all attack traits for targets#21452
PunkPun merged 1 commit into
OpenRA:bleedfrom
cameo-mod:autotarget

Conversation

@tjk-ws

@tjk-ws tjk-ws commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

Mods where an actor had multiple attack traits using weapons with mutually exclusive target types found only one able to autotarget, as the first element in the attack trait collection always returned even if the target was invalid. The attack trait's target search now returns only if the target is valid, otherwise it iterates on until one is found and so all attack traits will be searched properly.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@PunkPun PunkPun merged commit 2a3271b into OpenRA:bleed Jun 17, 2024
@PunkPun

PunkPun commented Jun 17, 2024

Copy link
Copy Markdown
Member

changelog

@tjk-ws tjk-ws deleted the autotarget branch July 7, 2024 01:23
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.

2 participants