diff options
Diffstat (limited to 'src/render/particlesystem.cc')
-rw-r--r-- | src/render/particlesystem.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/render/particlesystem.cc b/src/render/particlesystem.cc index c085d5d..c29243c 100644 --- a/src/render/particlesystem.cc +++ b/src/render/particlesystem.cc @@ -156,8 +156,13 @@ void ParticleSystem::draw(const float seconds) ParticleEjector *ejector = (*it); if (entity()) { + float thrust_factor = 1.0f; bool ejector_active = true; + if (ejector->thrust()) { + thrust_factor = 0.0f; + } + if (ejector->impulse() || ejector->thrust() || ejector->explosion()) { ejector_active = false; } @@ -170,6 +175,7 @@ void ParticleSystem::draw(const float seconds) case core::Entity::ImpulseInitiate: if (ejector->impulse()) { ejector_active = true; + thrust_factor = 1.0f; } break; @@ -177,6 +183,7 @@ void ParticleSystem::draw(const float seconds) if (ejector->thrust()) { if (controlable->thrust() > 0.0f) { ejector_active = true; + thrust_factor = controlable->thrust(); } } break; @@ -223,10 +230,10 @@ void ParticleSystem::draw(const float seconds) } } ejector->enable(ejector_active); + + (*it)->frame(seconds, current_location, current_axis * ejector->axis(), thrust_factor); } - (*it)->frame(seconds, current_location, current_axis * ejector->axis()); - } } |