Fix particles emitting when emitting is set to false in scene

Caused by #10297 calling particles_restart() on the same frame as the one set_emitting(false) is called. The rasterizer would wait a frame, and then set emitting back to true.
This commit is contained in:
Bojidar Marinov 2017-08-16 23:38:36 +03:00
parent 19aff15a1a
commit 995fca44b2
No known key found for this signature in database
GPG key ID: 4D546A8F1E091856

View file

@ -5177,6 +5177,10 @@ void RasterizerStorageGLES3::particles_set_emitting(RID p_particles, bool p_emit
Particles *particles = particles_owner.getornull(p_particles);
ERR_FAIL_COND(!particles);
if (p_emitting != particles->emitting) {
// Restart is overriden by set_emitting
particles->restart_request = false;
}
particles->emitting = p_emitting;
}
void RasterizerStorageGLES3::particles_set_amount(RID p_particles, int p_amount) {