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-01-27 23:10:01 +0000
committerStijn Buys <ingar@osirion.org>2013-01-27 23:10:01 +0000
commit341febfa2be738eb231c878b6b16fd13d420ca2b (patch)
treec180dc578508ae9ab7bc97a111e854a704fbb442
parentf4eee214a79634cdd2e6fe576950524170c01fa9 (diff)
Scale particle according to entity radius instead of modelscale.
-rw-r--r--src/render/particlesystem.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/render/particlesystem.cc b/src/render/particlesystem.cc
index 9cc2fca..e041479 100644
--- a/src/render/particlesystem.cc
+++ b/src/render/particlesystem.cc
@@ -102,12 +102,12 @@ ParticleSystem::ParticleSystem(const ParticleSystemScript *script, const core::E
}
}
- if (ejector->scaled()) {
- ejector->get_speed_vec() *= particlesystem_modelscale;
- ejector->get_tailspeed_vec() *= particlesystem_modelscale;
- ejector->get_radius_vec() *= particlesystem_modelscale;
- ejector->set_acceleration(ejector->acceleration() * particlesystem_modelscale);
- }
+ if (entity && ejector->scaled()) {
+ ejector->get_speed_vec() *= entity->radius();
+ ejector->get_tailspeed_vec() *= entity->radius();
+ ejector->get_radius_vec() *= entity->radius();
+ ejector->set_acceleration(ejector->acceleration() * entity->radius());
+ }
}
}
}