diff options
author | Evan Goers <mega@osirion.org> | 2012-01-13 08:39:53 +0000 |
---|---|---|
committer | Evan Goers <mega@osirion.org> | 2012-01-13 08:39:53 +0000 |
commit | aba7572643ca5211b6c13bb0cf37c3d2fffea11b (patch) | |
tree | 9490eaffb953effaa0022359e1a61ec87fe1db29 /src/render | |
parent | 28eeb651acfd294b2b0bb7d4e14f09eb365caf7c (diff) |
Fix particle script 'engine', 'entity', 'color' flags.
Enable light attenuation in modelview.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/particles.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/render/particles.cc b/src/render/particles.cc index b772f56..40b79ad 100644 --- a/src/render/particles.cc +++ b/src/render/particles.cc @@ -290,11 +290,14 @@ ParticleSystem::ParticleSystem(const ParticleScript *script, const core::Entity particlesystem_radius = particlesystem_script->radius(); particlesystem_cull = particlesystem_script->cull(); + // allow the script to override itself if (particlesystem_script->entity()) { particlesystem_color.assign(entity->color()); - } else if (particlesystem_script->has_color()) { + } + if (particlesystem_script->has_color()) { particlesystem_color.assign(particlesystem_script->color()); - } else if (particlesystem_script->engine()) { + } + if (particlesystem_script->engine()) { particlesystem_color.assign(entity->model()->enginecolor()); } |