summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-24 13:48:56 +0200
committerGitHub <noreply@github.com>2019-06-24 13:48:56 +0200
commit25022a1d89e83bbad6f4e5d8db0a4f1939bbf3ea (patch)
treee8d64bfd21236eb9820079c379093be0328cd52e /scene/2d
parent1cb2b682ab72e2c457b54fdf63628bc1db126c7d (diff)
parent64ecc8a5a3e22f92cf480f65249ac5468b9b5b89 (diff)
Merge pull request #29974 from clayjohn/particles_restart
Properly set emitting when particles restart
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/cpu_particles_2d.cpp2
-rw-r--r--scene/2d/particles_2d.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 2396faa84b..fba1c26d1c 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<Particle>::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) {