diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-24 20:01:20 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-24 20:01:20 +0000 |
commit | 808b21fc5fc33cf426fe459c7334d8101baafa0a (patch) | |
tree | f98e77fc9e1d2d8b397c729411288544fa4e60f0 | |
parent | 4f87da2cb4d96cf057bd4202bdf69aa0dae39c0f (diff) |
removed core::localcontrol()->movement() dependency from dust renderer
-rw-r--r-- | src/render/dust.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/render/dust.cc b/src/render/dust.cc index cb8d84d..fe74536 100644 --- a/src/render/dust.cc +++ b/src/render/dust.cc @@ -106,12 +106,11 @@ void Dust::draw(math::Color const &dustcolor) } - traillength = math::max(math::max(core::localcontrol()->movement(), core::localcontrol()->speed() * 0.5f), 0.5f); + traillength = math::max(core::localcontrol()->speed() * 0.5f, 0.5f); traillength = traillength * TRAILLENGHT / LOWSPEEDLIMIT; math::Color color(dustcolor); - alpha = math::max(core::localcontrol()->movement(), core::localcontrol()->speed() * 0.5f); - math::clamp(alpha, 0.0f, 1.0f); + alpha = math::min(core::localcontrol()->speed(), 1.0f); color.a = 0.25f * alpha; gl::begin(gl::Lines); |