diff options
author | Stijn Buys <ingar@osirion.org> | 2013-01-27 23:10:01 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-01-27 23:10:01 +0000 |
commit | 341febfa2be738eb231c878b6b16fd13d420ca2b (patch) | |
tree | c180dc578508ae9ab7bc97a111e854a704fbb442 /src/render | |
parent | f4eee214a79634cdd2e6fe576950524170c01fa9 (diff) |
Scale particle according to entity radius instead of modelscale.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/particlesystem.cc | 12 |
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()); + } } } } |