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/2d | |
parent | 9008cc486e28553ff8ea07639245efedcf545be2 (diff) |
Fixed emitting not initialized correctly in cpu particles 2d/3d
Fixes uninitialized variable caused by PR #32921
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 9da41914d7..07f3e10244 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -260,8 +260,7 @@ void CPUParticles2D::restart() { inactive_time = 0; frame_remainder = 0; cycle = 0; - - set_emitting(true); + emitting = false; { int pc = particles.size(); @@ -271,6 +270,8 @@ void CPUParticles2D::restart() { w[i].active = false; } } + + set_emitting(true); } void CPUParticles2D::set_direction(Vector2 p_direction) { @@ -1422,6 +1423,7 @@ CPUParticles2D::CPUParticles2D() { frame_remainder = 0; cycle = 0; redraw = false; + emitting = false; mesh = VisualServer::get_singleton()->mesh_create(); multimesh = VisualServer::get_singleton()->multimesh_create(); |