Skip to content

[pull] master from beyond-all-reason:master - #102

Merged
pull[bot] merged 1 commit into
ExaDev:masterfrom
beyond-all-reason:master
Sep 16, 2026
Merged

pull[bot] merged 1 commit into
ExaDev:masterfrom
beyond-all-reason:master

Conversation

@pull

@pull pull Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…aircraft as attack targets (#3348)

* Reset attack state after StopAttackingTargetIf and skip crashing aircraft as attack targets

Two related problems with Attack queues over aircraft (#3347):

1. CCommandAI::StopAttackingTargetIf (used by CUnit::SetNeutral, which BAR's
   crashing-aircraft gadget calls for every shot-down plane) erases the order
   being executed from the queue without FinishCommand. inCommand stays
   CMD_ATTACK and orderTarget keeps the old target, so the next queued Attack
   is never initialised: the unit idles with that order at the front of its
   queue until the target dies or leaves radar. Reset the execution state when
   the front order is erased so the next order starts normally at the unit's
   next SlowUpdate.

2. A crashing flyer is not an available attack target (weapons refuse it
   unless fireAtCrashing), but only CAirCAI noticed, and only one SlowUpdate
   after the order started; CMobileCAI and CCommandAI kept such an order until
   the aircraft was deleted. Check the target when the order starts executing
   in all three CAIs and end an ongoing attack when its target starts
   crashing, matching the existing AirCAI periodic check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Remove comment

Co-authored-by: sprunk <spr.ng@o2.pl>

* Remove Comment.

Co-authored-by: sprunk <spr.ng@o2.pl>

* Respect fireAtCrashing when selecting and executing attack targets

Share the command-AI crashing-target predicate, honor the modrule in fighter target searches, and add the PR changelog snippet.

Validation: Podman headless build and 52 regression assertions across both modrule settings passed.

AI assistance: OpenAI Codex prepared the changes and automated validation.

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: sprunk <spr.ng@o2.pl>
@pull pull Bot locked and limited conversation to collaborators Sep 16, 2026
@pull pull Bot added the ⤵️ pull label Sep 16, 2026
@pull
pull Bot merged commit b6a618f into ExaDev:master Sep 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant