Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-02-09 11:16:24 +0000
committerStijn Buys <ingar@osirion.org>2013-02-09 11:16:24 +0000
commit283a59e352d252e03793abec8d5e59ab50497f0c (patch)
treebbc3159ba935faba9cfbc17be7dd64b2a59ca112 /src/render
parentc0d374ec657dd7824c47c9884943af19365b0fde (diff)
Disable particle system ejectors for EntityDynamic in Entity::NoPower state.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/particlesystem.cc11
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());