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 @@ -1165,6 +1165,16 @@ void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
setAirfieldForHealing(INVALID_ID);
#endif

#if !RETAIL_COMPATIBLE_CRC
// Ignore the command if we are told to enter ourselves (we can be in the same group).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TheSuperHackers @bugfix

if (parms->m_cmd == AICMD_ENTER && parms->m_obj && parms->m_obj->getID() == getObject()->getID())
return;

// Ignore the command if we are told to enter something we cannot (we can be in the same group).
if (parms->m_cmd == AICMD_ENTER && !TheActionManager->canEnterObject(getObject(), parms->m_obj, parms->m_cmdSource, DONT_CHECK_CAPACITY))
return;
#endif

if (!isAllowedToRespondToAiCommands(parms))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,16 @@ void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
setAirfieldForHealing(INVALID_ID);
#endif

#if !RETAIL_COMPATIBLE_CRC
// Ignore the command if we are told to enter ourselves (we can be in the same group).
if (parms->m_cmd == AICMD_ENTER && parms->m_obj && parms->m_obj->getID() == getObject()->getID())
return;

// Ignore the command if we are told to enter something we cannot (we can be in the same group).
if (parms->m_cmd == AICMD_ENTER && !TheActionManager->canEnterObject(getObject(), parms->m_obj, parms->m_cmdSource, DONT_CHECK_CAPACITY))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can merge the parms->m_cmd == AICMD_ENTER condition into one.

return;
#endif

Comment on lines +1299 to +1308

@Caball009 Caball009 Aug 12, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it possible to put this in a case for AICMD_ENTER in the switch statement below?

if (!isAllowedToRespondToAiCommands(parms))
return;

Expand Down
Loading