From 64ecc8a5a3e22f92cf480f65249ac5468b9b5b89 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Fri, 21 Jun 2019 22:33:11 -0700 Subject: properly set emitting when particles restart --- scene/2d/cpu_particles_2d.cpp | 2 ++ scene/2d/particles_2d.cpp | 1 + 2 files changed, 3 insertions(+) (limited to 'scene/2d') diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index a8d72bb774..8726a9b3e7 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -250,6 +250,8 @@ void CPUParticles2D::restart() { frame_remainder = 0; cycle = 0; + set_emitting(true); + { int pc = particles.size(); PoolVector::Write w = particles.write(); diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index 9701998f5d..823794c3ba 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -278,6 +278,7 @@ void Particles2D::_validate_property(PropertyInfo &property) const { void Particles2D::restart() { VS::get_singleton()->particles_restart(particles); + VS::get_singleton()->particles_set_emitting(particles, true); } void Particles2D::_notification(int p_what) { -- cgit v1.2.3