From 0ae585bf90031a95cec165bb6f0e25e337b9ecff Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 14 Oct 2013 16:47:23 +0000 Subject: More explosion particles bugfixes. --- src/render/particleejectorscript.cc | 2 ++ src/render/particlesystem.cc | 6 ++++-- src/render/particlesystemscript.cc | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/render') diff --git a/src/render/particleejectorscript.cc b/src/render/particleejectorscript.cc index 250eb20..c62e2dc 100644 --- a/src/render/particleejectorscript.cc +++ b/src/render/particleejectorscript.cc @@ -24,6 +24,7 @@ ParticleEjectorScript::ParticleEjectorScript() script_engine = false; script_impulse = false; script_thrust = false; + script_explosion = false; script_cull = model::CullNone; script_spawn_radius = 0.0f; script_attached = false; @@ -47,6 +48,7 @@ ParticleEjectorScript::ParticleEjectorScript(const ParticleEjectorScript &other) script_engine = other.engine(); script_impulse = other.impulse(); script_thrust = other.thrust(); + script_explosion = other.explosion(); script_cull = other.cull(); script_attached = other.attached(); script_scaled = other.scaled(); diff --git a/src/render/particlesystem.cc b/src/render/particlesystem.cc index 1e3f13b..1487587 100644 --- a/src/render/particlesystem.cc +++ b/src/render/particlesystem.cc @@ -181,12 +181,14 @@ void ParticleSystem::draw(const float seconds) } break; - default: - // ejectors should be active to draw explosions + case core::Entity::Destroyed: if (ejector->explosion()) { ejector_active = true; } break; + + default: + break; } } else if (entity()->type() == core::Entity::Dynamic) { diff --git a/src/render/particlesystemscript.cc b/src/render/particlesystemscript.cc index 4c1f62b..2488446 100644 --- a/src/render/particlesystemscript.cc +++ b/src/render/particlesystemscript.cc @@ -236,7 +236,7 @@ ParticleSystemScript *ParticleSystemScript::load(const std::string &label) continue; } else if (inifile.got_key_bool("explosion", b)) { - ejector->set_impulse(b); + ejector->set_explosion(b); continue; } else if (inifile.got_key_bool("entity", b)) { -- cgit v1.2.3