bugfix: Make Helicopter and Chinook ignore repair command when ordered to repair again at the same airfield - #3118
Draft
Caball009 wants to merge 4 commits into
Draft
Conversation
Caball009
commented
Aug 12, 2026
| } | ||
|
|
||
| FALLTHROUGH; | ||
| FALLTHROUGH; // else fall through to the default case! |
Author
There was a problem hiding this comment.
@Stubbjax Was the intention here is to fall through to the default case, instead of AICMD_ENTER or AICMD_GET_REPAIRED ?
Code was added here: https://github.com/TheSuperHackers/GeneralsGameCode/pull/2174/changes
I'll to need to revert some changes if your code does what it intended to do.
There was a problem hiding this comment.
The intention is that if the jet is not out of special reload ammo, then it will proceed to the default case.
Author
There was a problem hiding this comment.
Right. That's slightly different from how the code behaves prior to this PR, but I fixed it.
Perhaps I should use a goto, though. It'd be more robust as it'll withstand future changes to the switch statement.
Caball009
force-pushed
the
fix_heli_chinook_repair
branch
from
August 13, 2026 15:07
81c4c7e to
25c1a62
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Helipad units (e.g. Comanches, Chinooks and Helixes) will interrupt their repair sequence even when ordered to repair at the same airfield they were already repairing at. This PR makes them ignore the repair command in that case.
See commits for cleaner diffs.
Before:
gen_zh_aircraft_repair_before.mp4
After:
gen_zh_aircraft_repair_after.mp4
TODO:
JetAIUpdate::aiDoCommand.