[BUG] In the current particle emitter

Hey all,

I was finally able to track down issue in my emitter (which I just about literally thought I was going to go crazy trying to figure out), I decided to see if the same issue was in the current JME emitter, and low & behold… there it was:

When the particle buffers are being updated, this check is at the beginning of the loop:

[java]
if (dead){
positions.put(0).put(0).put(0);
positions.put(0).put(0).put(0);
positions.put(0).put(0).put(0);
positions.put(0).put(0).put(0);
continue;
}
[/java]

The problem is, later in the loop the texCoords & color are updated. So… if a particle is dead, the index that the texCoords and colors are put into are totally wrong.

Say there are 10 particles and only 5 are alive…

There will be 10 particles worth of positions, but only 5 for texCoords and colors… in the wrong place in the buffer. The reason no one has reported this is, it would not throw an error… just potentially look all sorts of wrong (depending on the emitter setup).

Anyways… hope this is helpful.