Skip to content

Commit

Permalink
Merge pull request #10297 from leezh/fix_10181
Browse files Browse the repository at this point in the history
Disabling Particles::one_shot restarts emission
  • Loading branch information
akien-mga authored Aug 13, 2017
2 parents 0e81053 + a625d7e commit 26137f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/2d/particles_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
2 changes: 2 additions & 0 deletions scene/3d/particles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 26137f3

Please sign in to comment.