Disabling Particles::one_shot restarts emission

Fixes #10181
This commit is contained in:
Zher Huei Lee 2017-08-12 16:13:29 +08:00
parent 23f6d3fa69
commit a625d7edfc
2 changed files with 4 additions and 0 deletions

View file

@ -55,6 +55,8 @@ void Particles2D::set_one_shot(bool p_enable) {
one_shot = p_enable;
VS::get_singleton()->particles_set_one_shot(particles, one_shot);
if (!one_shot && emitting)
VisualServer::get_singleton()->particles_restart(particles);
}
void Particles2D::set_pre_process_time(float p_time) {

View file

@ -63,6 +63,8 @@ void Particles::set_one_shot(bool p_one_shot) {
one_shot = p_one_shot;
VS::get_singleton()->particles_set_one_shot(particles, one_shot);
if (!one_shot && emitting)
VisualServer::get_singleton()->particles_restart(particles);
}
void Particles::set_pre_process_time(float p_time) {