Fixed compiler warnings and some minor coding style issues.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7365 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
225116fb6f
commit
35cf3c7eab
@ -1637,13 +1637,14 @@ void Kart::updateGraphics(const Vec3& offset_xyz,
|
||||
{
|
||||
// fabs(speed) is important, otherwise the negative number will
|
||||
// become a huge unsigned number in the particle scene node!
|
||||
const float minRate = m_nitro->getParticlesInfo()->getMinRate();
|
||||
const float maxRate = m_nitro->getParticlesInfo()->getMaxRate();
|
||||
const float min_rate = (float)(m_nitro->getParticlesInfo()->getMinRate());
|
||||
const float max_rate = (float)(m_nitro->getParticlesInfo()->getMaxRate());
|
||||
const float rate = fabsf(getSpeed())/m_kart_properties->getMaxSpeed();
|
||||
assert(rate >= 0.0f); // allow for rounding errors...
|
||||
//assert(rate <= 2.0f); // max speed is not always respected it seems...
|
||||
m_nitro->setCreationRate(m_controls.m_nitro && isOnGround() && m_collected_energy>0
|
||||
? (minRate + rate*(maxRate - minRate)) : 0);
|
||||
m_nitro->setCreationRate(m_controls.m_nitro && isOnGround() &&
|
||||
m_collected_energy>0
|
||||
? (min_rate + rate*(max_rate - min_rate)) : 0);
|
||||
}
|
||||
|
||||
// For testing purposes mis-use the nitro graphical effects to show
|
||||
|
Loading…
Reference in New Issue
Block a user