Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/render/particles.cc7
-rwxr-xr-xsrc/ui/modelview.cc2
2 files changed, 7 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());
}
diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc
index 7ac8ef3..b370029 100755
--- a/src/ui/modelview.cc
+++ b/src/ui/modelview.cc
@@ -227,6 +227,8 @@ void ModelView::draw()
glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse_light);
glLightfv(GL_LIGHT1, GL_SPECULAR, specular_light);
+ glLightf(GL_LIGHT1, GL_LINEAR_ATTENUATION, 0.05f);
+
gl::enable(GL_LIGHT1);
render::draw_model_fragments(model, modelview_color_primary, modelview_color_secondary, core::application()->time(), true, true, thrust);