diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp index 92b2a72dc8e..7639cb375f5 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp @@ -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). + 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; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp index 6c92290ae2d..4c61edc0081 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp @@ -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)) + return; +#endif + if (!isAllowedToRespondToAiCommands(parms)) return;