diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-08 12:17:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-08 12:17:16 +0100 |
commit | 17d92c2b0995e82f5291c5a1e097e7b607151d31 (patch) | |
tree | e2356c36eb02c07bff3d21f0751706170d5b964d /scene | |
parent | da18307a5327475a8a4142a06b7ba3db145d6c5c (diff) | |
parent | fe6123fca4e56bfa17c92874d85fa434abf9767f (diff) |
Merge pull request #25551 from JFonS/fix_rogue_cpu_particles
Fix local_delta when resetting CPUParticles
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 21feb6e226..eaed1da0ba 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -594,7 +594,7 @@ void CPUParticles2D::_particles_process(float p_delta) { if (restart_time >= prev_time) { restart = true; if (fractional_delta) { - local_delta = (1.0 - restart_time + time) * lifetime; + local_delta = (lifetime - restart_time + time) * lifetime; } } else if (restart_time < time) { |