diff options
author | Stijn Buys <ingar@osirion.org> | 2013-02-09 11:16:24 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-02-09 11:16:24 +0000 |
commit | 283a59e352d252e03793abec8d5e59ab50497f0c (patch) | |
tree | bbc3159ba935faba9cfbc17be7dd64b2a59ca112 /src | |
parent | c0d374ec657dd7824c47c9884943af19365b0fde (diff) |
Disable particle system ejectors for EntityDynamic in Entity::NoPower state.
Diffstat (limited to 'src')
-rw-r--r-- | src/render/particlesystem.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/render/particlesystem.cc b/src/render/particlesystem.cc index e041479..87cb7bc 100644 --- a/src/render/particlesystem.cc +++ b/src/render/particlesystem.cc @@ -175,9 +175,18 @@ void ParticleSystem::draw(const float seconds) ejector_active = false; break; } - ejector->enable(ejector_active); + } + + } else if (entity()->type() == core::Entity::Dynamic) { + + const core::EntityDynamic *dynamic = static_cast<const core::EntityDynamic *>(entity()); + if (dynamic->state() == core::Entity::NoPower) { + ejector_active = false; } } + + ejector->enable(ejector_active); + } (*it)->frame(seconds, current_location, current_axis * ejector->axis()); |