Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/dust.cc')
-rw-r--r--src/render/dust.cc9
1 files changed, 5 insertions, 4 deletions
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;