From 5e76078ab79e87a545cfc24ec7dcd3914cc44d43 Mon Sep 17 00:00:00 2001 From: Gavin Ridley Date: Fri, 12 Feb 2021 11:15:19 -0500 Subject: [PATCH] reset n_event_ in initialize_history --- src/simulation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/simulation.cpp b/src/simulation.cpp index 303575130..b4795f2e7 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -472,6 +472,9 @@ void initialize_history(Particle& p, int64_t index_source) // set progeny count to zero p.n_progeny_ = 0; + // Reset particle event counter + p.n_event_ = 0; + // set random number seed int64_t particle_seed = (simulation::total_gen + overall_generation() - 1) * settings::n_particles + p.id_;