diff options
author | Stijn Buys <ingar@osirion.org> | 2013-10-14 16:47:23 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-10-14 16:47:23 +0000 |
commit | 0ae585bf90031a95cec165bb6f0e25e337b9ecff (patch) | |
tree | 93f698c5e519cb3c06501e41d6b448909fdb1044 /src/render | |
parent | d6471bf0f398257cb379944323cf85e8115491a5 (diff) |
More explosion particles bugfixes.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/particleejectorscript.cc | 2 | ||||
-rw-r--r-- | src/render/particlesystem.cc | 6 | ||||
-rw-r--r-- | src/render/particlesystemscript.cc | 2 |
3 files changed, 7 insertions, 3 deletions
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)) { |