From 299bccdee99a9858f3bb874c70bd435151018e3a Mon Sep 17 00:00:00 2001 From: romulox_x Date: Sun, 12 Oct 2014 20:20:56 -0700 Subject: [PATCH] offset particle drawing order so that recently emitted particles are always drawn on top of the older ones --- scene/2d/particles_2d.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index ded86702ef2..819b06e0951 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -507,7 +507,13 @@ void Particles2D::_notification(int p_what) { } - for(int i=0;i= particle_count) { + i -= particle_count; + } Particle &p=pdata[i]; if (!p.active)