diff options
author | JFonS <joan.fonssanchez@gmail.com> | 2019-02-01 17:16:09 +0100 |
---|---|---|
committer | JFonS <joan.fonssanchez@gmail.com> | 2019-02-01 17:16:09 +0100 |
commit | fe6123fca4e56bfa17c92874d85fa434abf9767f (patch) | |
tree | d891e2611f3033a32f2c166ff140a2b21d19a13e /scene/2d/cpu_particles_2d.cpp | |
parent | 58de38497839148ac5ea2062fdd360e82e1197aa (diff) | |
download | redot-engine-fe6123fca4e56bfa17c92874d85fa434abf9767f.tar.gz |
Fix local_delta when resetting CPUParticles
Diffstat (limited to 'scene/2d/cpu_particles_2d.cpp')
-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) { |