diff --git a/src/modules/butterflies/butterflies_dispersal.c b/src/modules/butterflies/butterflies_dispersal.c index 7422d08ff3c1e0a2c518eedbd374ccc21d5cd12a..b995e3dab695c13bf7998b6dba32c35602ee734f 100644 --- a/src/modules/butterflies/butterflies_dispersal.c +++ b/src/modules/butterflies/butterflies_dispersal.c @@ -42,6 +42,7 @@ static void inline single_random_walk(struct cats_thread_info *ts, struct cats_g const struct conf_data_butterflies *module_conf = CATS_MODULE_DATA; const bool debug_rw = module_conf->debug_rw; + int32_t eggs_left = eggs; const cats_dt_coord max_steps = module_conf->animal_dispersal_max_radius; @@ -71,6 +72,7 @@ static void inline single_random_walk(struct cats_thread_info *ts, struct cats_g return; // we escaped the simulation extent and got lost } + // is the cell a valid dispersal target location? if (!(data->info_layer[row][col] & BF_CELL_VALID_DISPERSAL_TARGET)) { if (debug_rw) { @@ -220,6 +222,7 @@ butterflies_cell_dispersal(struct cats_grid *grid, struct cats_thread_info *ts, if (debug_rw) { fflush(module_conf->debug_rw_file); fclose(module_conf->debug_rw_file); + log_message(LOG_IMPORTANT, "Ending simulation early - first cell with random walks complete"); exit_cats(EXIT_SUCCESS); } } \ No newline at end of file