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-10-17 20:06:14 +0000
committerStijn Buys <ingar@osirion.org>2013-10-17 20:06:14 +0000
commitb04e9dbada7f82434774b8af02db5c1f975ea2d6 (patch)
treee92f00c7b8db9b51062d7b8e9a7a6c0aa621007b /src/render
parent7e14c9fbb8767d6ebfb2e3bb94020767b074b9fa (diff)
Draw explosion particles for destroyed dynamic entities.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/particlesystem.cc26
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);
}