Fix one-shot stream emitter
parent
ec9e21dc8a
commit
637319cfd0
|
@ -181,9 +181,12 @@ void update_particle_system(ParticleSystem_t* system)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
emitter->particles[i].spawned = true;
|
emitter->particles[i].spawned = true;
|
||||||
|
spawn_particle(emitter, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (emitter->particles[i].spawned)
|
||||||
|
{
|
||||||
if (!emitter->particles[i].alive)
|
if (!emitter->particles[i].alive)
|
||||||
{
|
{
|
||||||
if (!emitter->active)
|
if (!emitter->active)
|
||||||
|
@ -194,13 +197,14 @@ void update_particle_system(ParticleSystem_t* system)
|
||||||
{
|
{
|
||||||
inactive_count++;
|
inactive_count++;
|
||||||
}
|
}
|
||||||
else if (emitter->particles[i].spawned)
|
else
|
||||||
{
|
{
|
||||||
// If not one shot, immediately revive the particle
|
// If not one shot, immediately revive the particle
|
||||||
spawn_particle(emitter, i);
|
spawn_particle(emitter, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (inactive_count == emitter->n_particles)
|
if (inactive_count == emitter->n_particles)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue