From c13ac398f68ac1c16967ea2ffdfaf7cc854f76a8 Mon Sep 17 00:00:00 2001 From: JFonS Date: Sun, 10 Mar 2019 00:33:08 +0100 Subject: Fix resetting of CPUParticles (2D and 3D) --- scene/3d/cpu_particles.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scene/3d/cpu_particles.cpp') diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index fc2e5c9b0d..85bc2dd529 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -544,7 +544,7 @@ void CPUParticles::_particles_process(float p_delta) { if (restart_time >= prev_time && restart_time < time) { restart = true; if (fractional_delta) { - local_delta = (time - restart_time) * lifetime; + local_delta = time - restart_time; } } @@ -552,13 +552,13 @@ void CPUParticles::_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; } } else if (restart_time < time) { restart = true; if (fractional_delta) { - local_delta = (time - restart_time) * lifetime; + local_delta = time - restart_time; } } } -- cgit v1.2.3