File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/AI
Generals/Code/GameEngine/Source/GameLogic/AI Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -2596,7 +2596,17 @@ StateReturnType AIAttackApproachTargetState::updateInternal()
25962596 {
25972597 if ( victim->testStatus ( OBJECT_STATUS_STEALTHED ) && !victim->testStatus ( OBJECT_STATUS_DETECTED ) )
25982598 {
2599- return STATE_FAILURE; // If obj is stealthed, can no longer approach.
2599+ // If obj is stealthed, can no longer approach.
2600+ // TheSuperHackers @bugfix Stubbjax 19/11/2025 Except when disarming stealthed mines.
2601+ #if RETAIL_COMPATIBLE_CRC
2602+ return STATE_FAILURE;
2603+ #else
2604+ const Bool isTargetingMine = weapon && weapon->getDamageType () == DAMAGE_DISARM &&
2605+ (victim->isKindOf (KINDOF_MINE));
2606+
2607+ if (!isTargetingMine)
2608+ return STATE_FAILURE;
2609+ #endif
26002610 }
26012611 ai->setCurrentVictim (victim);
26022612 // Attacking an object.
Original file line number Diff line number Diff line change @@ -2682,7 +2682,17 @@ StateReturnType AIAttackApproachTargetState::updateInternal()
26822682 }
26832683 if ( victim->testStatus ( OBJECT_STATUS_STEALTHED ) && !victim->testStatus ( OBJECT_STATUS_DETECTED ) && !victim->testStatus ( OBJECT_STATUS_DISGUISED ) )
26842684 {
2685- return STATE_FAILURE; // If obj is stealthed, can no longer approach.
2685+ // If obj is stealthed, can no longer approach.
2686+ // TheSuperHackers @bugfix Stubbjax 19/11/2025 Except when disarming stealthed mines or traps.
2687+ #if RETAIL_COMPATIBLE_CRC
2688+ return STATE_FAILURE;
2689+ #else
2690+ const Bool isTargetingMine = weapon && weapon->getDamageType () == DAMAGE_DISARM &&
2691+ (victim->isKindOf (KINDOF_MINE) || victim->isKindOf (KINDOF_BOOBY_TRAP) || victim->isKindOf (KINDOF_DEMOTRAP));
2692+
2693+ if (!isTargetingMine)
2694+ return STATE_FAILURE;
2695+ #endif
26862696 }
26872697 ai->setCurrentVictim (victim);
26882698 // Attacking an object.
You can’t perform that action at this time.
0 commit comments