diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-10-24 21:38:01 +0200 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-10-24 21:38:01 +0200 |
commit | 1e0f37a70fd90e0ee8c7f43697bdc866cf8120b6 (patch) | |
tree | f29da228e8d93c385ccf02c08dccbff9cbecdfa3 /scene/3d/cpu_particles.cpp | |
parent | 9008cc486e28553ff8ea07639245efedcf545be2 (diff) | |
download | redot-engine-1e0f37a70fd90e0ee8c7f43697bdc866cf8120b6.tar.gz |
Fixed emitting not initialized correctly in cpu particles 2d/3d
Fixes uninitialized variable caused by PR #32921
Diffstat (limited to 'scene/3d/cpu_particles.cpp')
-rw-r--r-- | scene/3d/cpu_particles.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index 5c895ecf22..8766e30d0b 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -240,8 +240,7 @@ void CPUParticles::restart() { inactive_time = 0; frame_remainder = 0; cycle = 0; - - set_emitting(true); + emitting = false; { int pc = particles.size(); @@ -251,6 +250,8 @@ void CPUParticles::restart() { w[i].active = false; } } + + set_emitting(true); } void CPUParticles::set_direction(Vector3 p_direction) { @@ -1494,6 +1495,7 @@ CPUParticles::CPUParticles() { frame_remainder = 0; cycle = 0; redraw = false; + emitting = false; set_notify_transform(true); |