From a625d7edfc60255f019186fabe7f34eb5438295c Mon Sep 17 00:00:00 2001 From: Zher Huei Lee Date: Sat, 12 Aug 2017 16:13:29 +0800 Subject: Disabling Particles::one_shot restarts emission Fixes #10181 --- scene/3d/particles.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/3d/particles.cpp') diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 081caf441..d83469da6 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -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) { -- cgit v1.2.3-70-g09d2