From 084dd555366c326b7ee18515bcb282a8f4eb394a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 26 Aug 2008 18:51:54 +0000 Subject: dust color --- src/render/dust.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/render/dust.cc') diff --git a/src/render/dust.cc b/src/render/dust.cc index ad337b3..81d40fb 100644 --- a/src/render/dust.cc +++ b/src/render/dust.cc @@ -55,7 +55,7 @@ void Dust::reset() } } -void Dust::draw() +void Dust::draw(math::Color const &dustcolor) { float alpha = 0.0f; float traillength = 0.0f; @@ -91,9 +91,9 @@ void Dust::draw() return; } - alpha = math::max(core::localcontrol()->movement(), core::localcontrol()->speed()); + alpha = math::max(core::localcontrol()->movement()*0.5f, core::localcontrol()->speed()); math::clamp(alpha, 0.0f, 1.0f); - alpha = 0.2f + alpha * 0.8f; + alpha = 0.2f + alpha * 0.7f; if (!dust) { con_debug << " generating dust..." << std::endl; @@ -107,7 +107,8 @@ void Dust::draw() } } - math::Color color(1.0f, alpha); + math::Color color(dustcolor); + color.a = alpha; traillength = math::max(math::max(core::localcontrol()->movement(), core::localcontrol()->speed()), 0.5f); traillength = traillength * TRAILLENGHT / LOWSPEEDLIMIT; -- cgit v1.2.3