diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-12 19:50:04 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-12 19:50:04 +0000 |
commit | e6516fb9999ae47a828e032f0908d2f2ae4b2434 (patch) | |
tree | 80aaed66e95541d93bd56de6fb8cad997e078856 /src/render/particles.cc | |
parent | b460b3193e54b7364bb75ff26ce6f999887e454b (diff) |
enables entity model scaling, Entity::radius() gets precedence over Model::radius(),
corrected bullet motionstate transfer bug in Entity::reset(),
minor cleanups
Diffstat (limited to 'src/render/particles.cc')
-rw-r--r-- | src/render/particles.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/render/particles.cc b/src/render/particles.cc index 6ffcd35..610c49a 100644 --- a/src/render/particles.cc +++ b/src/render/particles.cc @@ -211,6 +211,14 @@ ParticleSystem::ParticleSystem(ParticleScript *script, core::Entity *entity, mod particlesystem_axis.assign(modelclass->axis()); // particlesystem_cull = particlesystem_modelclass->cull(); } + + + // rescale particle system according to entity radius + if (entity->model() && entity->model()->radius()) { + const float modelscale = entity->radius() / entity->model()->radius(); + particlesystem_location *= modelscale; + particlesystem_radius *= modelscale; + } } ParticleSystem::~ParticleSystem() |