made skidmarks conditions even stricter for Ai karts, so they create a bit less of them (mixed success; they seem to reach maximal steering very fast)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2772 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2008-12-25 18:39:46 +00:00
parent 3edb628251
commit 25fc6e5f07
2 changed files with 5 additions and 2 deletions

View File

@ -111,7 +111,9 @@ void SkidMarks::update(float dt)
if(!m_kart.getControls().m_drift) return; // no skidmarking
// not turning enough, don't draw skidmarks if kart is going straight ahead
if( fabsf(m_kart.getSteerPercent()) < 0.55) return;
// this is even stricter for Ai karts, since they tend to use LOTS of skidding
const float min_skid_angle = m_kart.isPlayerKart() ? 0.55 : 0.95;
if( fabsf(m_kart.getSteerPercent()) < min_skid_angle) return;
// Start new skid marks
// --------------------

View File

@ -780,8 +780,9 @@ void Kart::updatePhysics (float dt)
}
if(m_skidding>1.0f)
{
const float min_skid_angle = isPlayerKart() ? 0.55 : 0.95;
if(m_skid_sound->getStatus() != SFXManager::SFX_PLAYING &&
fabsf(getSteerPercent()) > 0.55 )
fabsf(getSteerPercent()) > min_skid_angle )
m_skid_sound->play();
}
else if(m_skid_sound->getStatus() == SFXManager::SFX_PLAYING)