diff --git a/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp b/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp index 79913a7c7d..4e4a849894 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp @@ -2596,7 +2596,15 @@ StateReturnType AIAttackApproachTargetState::updateInternal() { if( victim->testStatus( OBJECT_STATUS_STEALTHED ) && !victim->testStatus( OBJECT_STATUS_DETECTED ) ) { +#if RETAIL_COMPATIBLE_CRC return STATE_FAILURE; // If obj is stealthed, can no longer approach. +#else + Bool isTargetingMine = weapon && weapon->getDamageType() == DAMAGE_DISARM && + (victim->isKindOf(KINDOF_MINE)); + + if (!isTargetingMine) + return STATE_FAILURE; // If obj is stealthed, can no longer approach - unless we're targeting a mine! +#endif } ai->setCurrentVictim(victim); // Attacking an object. diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp index 6988747599..487c1068f3 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp @@ -2682,7 +2682,15 @@ StateReturnType AIAttackApproachTargetState::updateInternal() } if( victim->testStatus( OBJECT_STATUS_STEALTHED ) && !victim->testStatus( OBJECT_STATUS_DETECTED ) && !victim->testStatus( OBJECT_STATUS_DISGUISED ) ) { +#if RETAIL_COMPATIBLE_CRC return STATE_FAILURE; // If obj is stealthed, can no longer approach. +#else + Bool isTargetingMine = weapon && weapon->getDamageType() == DAMAGE_DISARM && + (victim->isKindOf(KINDOF_MINE) || victim->isKindOf(KINDOF_BOOBY_TRAP) || victim->isKindOf(KINDOF_DEMOTRAP)); + + if (!isTargetingMine) + return STATE_FAILURE; // If obj is stealthed, can no longer approach - unless we're targeting a mine! +#endif } ai->setCurrentVictim(victim); // Attacking an object.