diff options
-rw-r--r-- | src/render/particlesystem.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/render/particlesystem.cc b/src/render/particlesystem.cc index 1487587..c085d5d 100644 --- a/src/render/particlesystem.cc +++ b/src/render/particlesystem.cc @@ -181,12 +181,16 @@ void ParticleSystem::draw(const float seconds) } break; - case core::Entity::Destroyed: + case core::Entity::Destroyed: if (ejector->explosion()) { ejector_active = true; } break; + case core::Entity::NoPower: + ejector_active = false; + break; + default: break; } @@ -197,6 +201,26 @@ void ParticleSystem::draw(const float seconds) if (dynamic->state() == core::Entity::NoPower) { ejector_active = false; } + + switch (dynamic->state()) { + case core::Entity::Impulse: + case core::Entity::ImpulseInitiate: + case core::Entity::Normal: + break; + + case core::Entity::Destroyed: + if (ejector->explosion()) { + ejector_active = true; + } + break; + + case core::Entity::NoPower: + ejector_active = false; + break; + + default: + break; + } } ejector->enable(ejector_active); } |