From e9c2f2152f8755aa5396462f36fe73fe41dea492 Mon Sep 17 00:00:00 2001 From: Daniel Bergman Date: Sun, 24 Nov 2024 16:51:05 -0500 Subject: [PATCH] update neighbors to fix phagocytosis bug - make sure every cell has an updated neighbors list to start - this is the simplest change to fix the bug --- core/PhysiCell_cell.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/PhysiCell_cell.cpp b/core/PhysiCell_cell.cpp index 3780f0ea1..e392145c8 100644 --- a/core/PhysiCell_cell.cpp +++ b/core/PhysiCell_cell.cpp @@ -318,6 +318,9 @@ void Cell::advance_bundled_phenotype_functions( double dt_ ) // perform transformations standard_cell_transformations( this,this->phenotype,dt_ ); + // make sure neighbors are updated + state.neighbors = nearby_cells(); + // New March 2023 in Version 1.12.0 // call the rules-based code to update the phenotype if( PhysiCell_settings.rules_enabled )