Repository navigation
[pull] master from beyond-all-reason:master - #102
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )