tweaked material-specific slowdowns so that if you stop on e.g. sand, it's not hard to get out of there (before since acceleration was strongly cut at all times you could have trouble starting again if you stopped on sand)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3591 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-06-04 00:25:16 +00:00
parent 537a4613d6
commit 6ba50b831d

View File

@ -778,9 +778,13 @@ void Kart::updatePhysics (float dt)
// wall, he needs to be able to start again quickly after going backwards)
else if(m_speed < 0.0f)
engine_power *= 5.0f;
// Engine slow down due to terrain (see m_power_reduction is set in
// update() depending on terrain type.
engine_power *= m_power_reduction/stk_config->m_slowdown_factor;
// update() depending on terrain type. Don't apply this if kart is already
// going slowly, this would make it hard accelerating to get out of there
if(m_speed > 4.0)
engine_power *= m_power_reduction/stk_config->m_slowdown_factor;
// Lose some traction when skidding, so it is not abused by player
if(m_controls.m_drift)
engine_power *= 0.5f;