Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,13 @@ void DozerAIUpdate::newTask( DozerTask task, Object *target )
// multiple dozers/workers to double up on construction efforts
//
if( task == DOZER_TASK_BUILD )
{
// TheSuperHackers @bugfix Stubbjax 15/06/2026 Ignore the build task if the building is already complete.
if (target->getConstructionPercent() == CONSTRUCTION_COMPLETE)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this perhaps go into DozerAIUpdate::resumePreviousTask and here it should be an assert?

@Stubbjax Stubbjax Jun 14, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I suppose it could seeing as this is the only way it can happen. Having to resolve the target from the task info does make the code a bit more complex though.

return;

target->setBuilder( me );
}

m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].valid = TRUE;
m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].location = position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,13 @@ void WorkerAIUpdate::newTask( DozerTask task, Object* target )
// multiple dozers/workers to double up on construction efforts
//
if( task == DOZER_TASK_BUILD )
{
// TheSuperHackers @bugfix Stubbjax 15/06/2026 Ignore the build task if the building is already complete.
if (target->getConstructionPercent() == CONSTRUCTION_COMPLETE)
return;

target->setBuilder( me );
}

m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].valid = TRUE;
m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].location = position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,13 @@ void DozerAIUpdate::newTask( DozerTask task, Object *target )
// multiple dozers/workers to double up on construction efforts
//
if( task == DOZER_TASK_BUILD )
{
// TheSuperHackers @bugfix Stubbjax 15/06/2026 Ignore the build task if the building is already complete.
if (target->getConstructionPercent() == CONSTRUCTION_COMPLETE)
return;

target->setBuilder( me );
}

m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].valid = TRUE;
m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].location = position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,13 @@ void WorkerAIUpdate::newTask( DozerTask task, Object* target )
// multiple dozers/workers to double up on construction efforts
//
if( task == DOZER_TASK_BUILD )
{
// TheSuperHackers @bugfix Stubbjax 15/06/2026 Ignore the build task if the building is already complete.
if (target->getConstructionPercent() == CONSTRUCTION_COMPLETE)
return;

target->setBuilder( me );
}

m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].valid = TRUE;
m_dockPoint[ task ][ DOZER_DOCK_POINT_START ].location = position;
Expand Down
Loading