Skip to content

Commit

Permalink
flagging active cells restricted
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Jul 7, 2024
1 parent a0550f2 commit df21d27
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion source/EngineGpuKernels/AttackerProcessor.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ __inline__ __device__ int AttackerProcessor::countAndTrackDefenderCells(Simulati
auto connectedCell = cell->connections[i].cell;
if (connectedCell->cellFunction == CellFunction_Defender && connectedCell->cellFunctionData.defender.mode == DefenderMode_DefendAgainstAttacker) {
statistics.incNumDefenderActivities(connectedCell->color);
connectedCell->cellFunctionUsed = CellFunctionUsed_Yes;
++result;
}
}
Expand Down
4 changes: 1 addition & 3 deletions source/EngineGpuKernels/CellFunctionProcessor.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ __inline__ __device__ void CellFunctionProcessor::collectCellFunctionOperations(
} else if (cell->livingState == LivingState_Ready && cell->activationTime == 0) {
data.cellFunctionOperations[cell->cellFunction].tryAddEntry(CellFunctionOperation{cell});
}
if (cell->cellFunction == CellFunction_Defender && cell->cellFunctionUsed == CellFunctionUsed_No) {
cell->cellFunctionUsed = CellFunctionUsed_Yes;
}

}
}
}
Expand Down
1 change: 0 additions & 1 deletion source/EngineGpuKernels/ConstructorProcessor.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ __inline__ __device__ void ConstructorProcessor::processCell(SimulationData& dat
auto constructionData = readConstructionData(cell);
auto cellBuilt = false;
if (isConstructionTriggered(data, cell, activity)) {
cell->cellFunctionUsed = CellFunctionUsed_Yes;
if (tryConstructCell(data, statistics, cell, constructionData)) {
cellBuilt = true;
}
Expand Down

0 comments on commit df21d27

Please sign in to comment.