diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp index d5371bd9a3..315a62c1db 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp @@ -1596,9 +1596,14 @@ UpdateSleepTime DozerAIUpdate::update( void ) Bool invalidTask = FALSE; // validate the task and the target + // TheSuperHackers @bugfix Stubbjax 16/11/2025 Invalidate the task when the build scaffold is destroyed. if( currentTask == DOZER_TASK_REPAIR && TheActionManager->canRepairObject( getObject(), targetObject, getLastCommandSource() ) == FALSE ) invalidTask = TRUE; +#if !RETAIL_COMPATIBLE_CRC + else if (currentTask == DOZER_TASK_BUILD && targetObject == NULL) + invalidTask = TRUE; +#endif // cancel the task if it's now invalid if( invalidTask == TRUE ) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp index 7b2dfd9eec..44d11ad4ad 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp @@ -283,6 +283,10 @@ UpdateSleepTime WorkerAIUpdate::update( void ) if( currentTask == DOZER_TASK_REPAIR && TheActionManager->canRepairObject( getObject(), targetObject, getLastCommandSource() ) == FALSE ) invalidTask = TRUE; +#if !RETAIL_COMPATIBLE_CRC + else if (currentTask == DOZER_TASK_BUILD && targetObject == NULL) + invalidTask = TRUE; +#endif // cancel the task if it's now invalid if( invalidTask == TRUE ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp index ea9d64c9a2..4065a2ba3b 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp @@ -1601,9 +1601,14 @@ UpdateSleepTime DozerAIUpdate::update( void ) Bool invalidTask = FALSE; // validate the task and the target + // TheSuperHackers @bugfix Stubbjax 16/11/2025 Invalidate the task when the build scaffold is destroyed. if( currentTask == DOZER_TASK_REPAIR && TheActionManager->canRepairObject( getObject(), targetObject, getLastCommandSource() ) == FALSE ) invalidTask = TRUE; +#if !RETAIL_COMPATIBLE_CRC + else if (currentTask == DOZER_TASK_BUILD && targetObject == NULL) + invalidTask = TRUE; +#endif // cancel the task if it's now invalid if( invalidTask == TRUE ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp index a3bdd0628a..15e1af6b76 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp @@ -283,6 +283,10 @@ UpdateSleepTime WorkerAIUpdate::update( void ) if( currentTask == DOZER_TASK_REPAIR && TheActionManager->canRepairObject( getObject(), targetObject, getLastCommandSource() ) == FALSE ) invalidTask = TRUE; +#if !RETAIL_COMPATIBLE_CRC + else if (currentTask == DOZER_TASK_BUILD && targetObject == NULL) + invalidTask = TRUE; +#endif // cancel the task if it's now invalid if( invalidTask == TRUE )