From 341febfa2be738eb231c878b6b16fd13d420ca2b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 27 Jan 2013 23:10:01 +0000 Subject: Scale particle according to entity radius instead of modelscale. --- src/render/particlesystem.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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()); + } } } } -- cgit v1.2.3