only show skidmarks if the player is turning (i.e. don't show skidmarks when player is going straight) caveat: if you press the skid button, turn sharp, then go straight while still holding the button, skid marks will still appear.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2771 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
18262806d5
commit
3edb628251
@ -110,6 +110,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;
|
||||
|
||||
// Start new skid marks
|
||||
// --------------------
|
||||
const btWheelInfo::RaycastInfo &raycast_right =
|
||||
|
@ -780,7 +780,8 @@ void Kart::updatePhysics (float dt)
|
||||
}
|
||||
if(m_skidding>1.0f)
|
||||
{
|
||||
if(m_skid_sound->getStatus() != SFXManager::SFX_PLAYING)
|
||||
if(m_skid_sound->getStatus() != SFXManager::SFX_PLAYING &&
|
||||
fabsf(getSteerPercent()) > 0.55 )
|
||||
m_skid_sound->play();
|
||||
}
|
||||
else if(m_skid_sound->getStatus() == SFXManager::SFX_PLAYING)
|
||||
|
Loading…
Reference in New Issue
Block a user