Skip to content

Commit 1b2b182

Browse files
committed
bugfix: Invalidate current dozer build task if the target scaffold no longer exists
1 parent 2e95fe2 commit 1b2b182

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,6 +1599,10 @@ UpdateSleepTime DozerAIUpdate::update( void )
15991599
if( currentTask == DOZER_TASK_REPAIR &&
16001600
TheActionManager->canRepairObject( getObject(), targetObject, getLastCommandSource() ) == FALSE )
16011601
invalidTask = TRUE;
1602+
#if !RETAIL_COMPATIBLE_CRC
1603+
else if (currentTask == DOZER_TASK_BUILD && targetObject == NULL)
1604+
invalidTask = TRUE;
1605+
#endif
16021606

16031607
// cancel the task if it's now invalid
16041608
if( invalidTask == TRUE )

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/DozerAIUpdate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,10 @@ UpdateSleepTime DozerAIUpdate::update( void )
16041604
if( currentTask == DOZER_TASK_REPAIR &&
16051605
TheActionManager->canRepairObject( getObject(), targetObject, getLastCommandSource() ) == FALSE )
16061606
invalidTask = TRUE;
1607+
#if !RETAIL_COMPATIBLE_CRC
1608+
else if (currentTask == DOZER_TASK_BUILD && targetObject == NULL)
1609+
invalidTask = TRUE;
1610+
#endif
16071611

16081612
// cancel the task if it's now invalid
16091613
if( invalidTask == TRUE )

0 commit comments

Comments
 (0)