Fix aliveness check for emitter
Emitter aliveness should be checked with its finish state Also update bubbling to re-activate an still alive handlescene_man
parent
911663b51f
commit
f94ecedc7d
|
@ -130,7 +130,7 @@ bool is_emitter_handle_alive(ParticleSystem_t* system, EmitterHandle handle)
|
|||
{
|
||||
if (handle == 0) return false;
|
||||
|
||||
return system->emitters[handle].active;
|
||||
return !system->emitters[handle].finished;
|
||||
}
|
||||
|
||||
EmitterHandle play_particle_emitter(ParticleSystem_t* system, const ParticleEmitter_t* in_emitter)
|
||||
|
|
|
@ -1495,6 +1495,10 @@ void state_transition_update_system(Scene_t* scene)
|
|||
};
|
||||
p_emitter->handle = play_particle_emitter(&scene->part_sys, &emitter);
|
||||
}
|
||||
else
|
||||
{
|
||||
play_emitter_handle(&scene->part_sys, p_emitter->handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue