diff --git a/source/EngineGpuKernels/ReconnectorProcessor.cuh b/source/EngineGpuKernels/ReconnectorProcessor.cuh index 3505515fa..83061c1e4 100644 --- a/source/EngineGpuKernels/ReconnectorProcessor.cuh +++ b/source/EngineGpuKernels/ReconnectorProcessor.cuh @@ -77,12 +77,14 @@ ReconnectorProcessor::tryCreateConnection(SimulationData& data, SimulationStatis SystemDoubleLock lock; lock.init(&cell->locked, &closestCell->locked); if (lock.tryLock()) { - closestCell->maxConnections = min(max(closestCell->maxConnections, closestCell->numConnections + 1), MAX_CELL_BONDS); - cell->maxConnections = min(max(cell->maxConnections, cell->numConnections + 1), MAX_CELL_BONDS); - CellConnectionProcessor::scheduleAddConnectionPair(data, cell, closestCell); + if (cell->numConnections < MAX_CELL_BONDS && closestCell->numConnections < MAX_CELL_BONDS) { + closestCell->maxConnections = min(max(closestCell->maxConnections, closestCell->numConnections + 1), MAX_CELL_BONDS); + cell->maxConnections = min(max(cell->maxConnections, cell->numConnections + 1), MAX_CELL_BONDS); + CellConnectionProcessor::scheduleAddConnectionPair(data, cell, closestCell); + activity.channels[0] = 1; + statistics.incNumReconnectorCreated(cell->color); + } lock.releaseLock(); - activity.channels[0] = 1; - statistics.incNumReconnectorCreated(cell->color); } } } diff --git a/source/EngineInterface/SimulationParametersSpotValues.h b/source/EngineInterface/SimulationParametersSpotValues.h index 6ea70b600..92cea988b 100644 --- a/source/EngineInterface/SimulationParametersSpotValues.h +++ b/source/EngineInterface/SimulationParametersSpotValues.h @@ -15,7 +15,7 @@ struct SimulationParametersSpotValues ColorVector radiationCellAgeStrength = {0.00002f, 0.00002f, 0.00002f, 0.00002f, 0.00002f, 0.00002f, 0.00002f}; float cellMaxForce = 0.8f; ColorVector cellMinEnergy = {50.0f, 50.0f, 50.0f, 50.0f, 50.0f, 50.0f, 50.0f}; - float cellFusionVelocity = 0.4f; + float cellFusionVelocity = 0.6f; float cellMaxBindingEnergy = Infinity::value; ColorVector cellColorTransitionDuration = { Infinity::value,