From 808b21fc5fc33cf426fe459c7334d8101baafa0a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 24 Nov 2010 20:01:20 +0000 Subject: removed core::localcontrol()->movement() dependency from dust renderer --- src/render/dust.cc | 5 ++--- 1 file 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); -- cgit v1.2.3