-
Notifications
You must be signed in to change notification settings - Fork 151
tweak: Defer offensive commands for parked jets without ammo #2174
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2337,6 +2337,27 @@ void JetAIUpdate::aiDoCommand(const AICommandParms* parms) | |
| // don't need (or want) to take off for these | ||
| break; | ||
|
|
||
| #if !RETAIL_COMPATIBLE_CRC | ||
| // TheSuperHackers @tweak Stubbjax 23/01/2026 Parked jets now defer offensive commands when out of ammo. | ||
| case AICMD_ATTACKMOVE_TO_POSITION: | ||
| case AICMD_ATTACK_AREA: | ||
| case AICMD_ATTACK_OBJECT: | ||
| case AICMD_ATTACK_POSITION: | ||
| case AICMD_ATTACK_TEAM: | ||
| case AICMD_FORCE_ATTACK_OBJECT: | ||
| case AICMD_GUARD_AREA: | ||
| case AICMD_GUARD_OBJECT: | ||
| case AICMD_GUARD_POSITION: | ||
| case AICMD_HUNT: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did you determine that these are all the command that are needed here? There also is a
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to match the same values as I had originally added the waypoint path values but I ultimately deemed them unnecessary as they're scripted events and such events typically involve carefully managed specific behaviours. I'm happy to add them back if you think it's worthwhile adding them anyway. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did you conclude they are scripted events? Wouldn't all AI command be subject to use in scripted events?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By observing script actions for them in the World Builder and looking at the code paths for those behavioural states. For starters, I've only ever seen There's also seemingly no way to achieve aggressive waypoint path behaviour with player-controlled units. Look at how |
||
| if (isOutOfSpecialReloadAmmo(getObject())) | ||
| { | ||
| setFlag(HAS_PENDING_COMMAND, true); | ||
| return; | ||
| } | ||
|
|
||
| FALLTHROUGH; | ||
| #endif | ||
|
|
||
| case AICMD_ENTER: | ||
| case AICMD_GET_REPAIRED: | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.