Skip to content

Commit

Permalink
endless detonation bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Oct 25, 2023
1 parent d6dbc0e commit ff98daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/EngineGpuKernels/CellFunctionProcessor.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ __inline__ __device__ void CellFunctionProcessor::collectCellFunctionOperations(
auto executionOrderNumber = toInt(data.timestep % cudaSimulationParameters.cellNumExecutionOrderNumbers);
for (int index = partition.startIndex; index <= partition.endIndex; ++index) {
auto& cell = cells.at(index);
if (cell->cellFunction != CellFunction_None && cell->executionOrderNumber == executionOrderNumber && cell->activationTime == 0) {
if (cell->cellFunction != CellFunction_None && cell->executionOrderNumber == executionOrderNumber) {
if (cell->cellFunction == CellFunction_Detonator && cell->cellFunctionData.detonator.state == DetonatorState_Activated) {
data.cellFunctionOperations[cell->cellFunction].tryAddEntry(CellFunctionOperation{cell});
} else if (cell->livingState == LivingState_Ready) {
} else if (cell->livingState == LivingState_Ready && cell->activationTime == 0) {
data.cellFunctionOperations[cell->cellFunction].tryAddEntry(CellFunctionOperation{cell});
}
}
Expand Down

0 comments on commit ff98daf

Please sign in to comment.