Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich committed Dec 14, 2024
1 parent ecec61f commit 4c9de79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6232,8 +6232,6 @@ void releaseProduction(STRUCTURE *psBuilding, QUEUE_MODE mode)

void doNextProduction(STRUCTURE *psStructure, DROID_TEMPLATE *current, QUEUE_MODE mode)
{
DROID_TEMPLATE *psNextTemplate = factoryProdUpdate(psStructure, current);

if (current && current->next)
{
structSetManufacture(psStructure, current->next, ModeQueue);
Expand All @@ -6242,6 +6240,8 @@ void doNextProduction(STRUCTURE *psStructure, DROID_TEMPLATE *current, QUEUE_MOD
return;
}

DROID_TEMPLATE *psNextTemplate = factoryProdUpdate(psStructure, current);

if (psNextTemplate != nullptr)
{
structSetManufacture(psStructure, psNextTemplate, ModeQueue); // ModeQueue instead of mode, since production lists aren't currently synchronised.
Expand Down

0 comments on commit 4c9de79

Please sign in to comment.