diff --git a/data/nitro.xml b/data/nitro.xml
index 07cda2921..12828135a 100644
--- a/data/nitro.xml
+++ b/data/nitro.xml
@@ -12,8 +12,8 @@
-
+
getParticlesInfo()->getMinRate();
+ const float maxRate = 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
- ? (10.0f + fabsf(getSpeed())*20.0f) : 0);
+ ? (minRate + rate*(maxRate - minRate)) : 0);
}
// For testing purposes mis-use the nitro graphical effects to show