diff options
-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()); + } } } } |