diff --git a/core/PhysiCell_cell.cpp b/core/PhysiCell_cell.cpp index 2755d7d5d..16f0ac8f4 100644 --- a/core/PhysiCell_cell.cpp +++ b/core/PhysiCell_cell.cpp @@ -946,7 +946,17 @@ void Cell::update_voxel_in_container() container->add_agent_to_voxel(this, updated_current_mechanics_voxel_index); } current_mechanics_voxel_index=updated_current_mechanics_voxel_index; + + // Update max_cell_interactive_distance_in_voxel if needed + if( get_container()->max_cell_interactive_distance_in_voxel[current_mechanics_voxel_index] < + phenotype.geometry.radius * phenotype.mechanics.relative_maximum_adhesion_distance ) + { + get_container()->max_cell_interactive_distance_in_voxel[current_mechanics_voxel_index] = phenotype.geometry.radius + * phenotype.mechanics.relative_maximum_adhesion_distance; + } } + + return; }