Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link

Choose a reason for hiding this comment

The 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 AICMD_ATTACKFOLLOW_WAYPOINT_PATH and it is not obvious whether that needs covering as well.

Copy link
Author

Choose a reason for hiding this comment

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

I wanted to match the same values as commandRequiresAmmo and isGuardCommand from #1757.

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.

Copy link

Choose a reason for hiding this comment

The 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?

if (isOutOfSpecialReloadAmmo(getObject()))
{
setFlag(HAS_PENDING_COMMAND, true);
return;
}

FALLTHROUGH;
#endif

case AICMD_ENTER:
case AICMD_GET_REPAIRED:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,28 @@ 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_GUARD_RETALIATE:
case AICMD_HUNT:
if (isOutOfSpecialReloadAmmo())
{
setFlag(HAS_PENDING_COMMAND, true);
return;
}

FALLTHROUGH;
#endif

case AICMD_ENTER:
case AICMD_GET_REPAIRED:

Expand Down
Loading