Removed sqrt from visual skidding angle, which helps keeping the

physics and visuals in synch (since the physics body will rotate
linearly over time when releasing skid, while the visuals would
still use sqrt).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10705 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2012-01-23 05:34:32 +00:00
parent b9cdffb650
commit 51468de16e

View File

@ -2244,7 +2244,7 @@ float Kart::getVisualSkidOffset() const
{
float speed_ratio = getSpeed()/MaxSpeed::getCurrentMaxSpeed();
float f = getSteerPercent() * speed_ratio;
if(m_kart_properties->getSkidVisualTime()==0 || m_skid_time < 0)
if(m_kart_properties->getSkidVisualTime()==0)
{
float r = m_skidding / m_kart_properties->getMaxSkid();
f *= r;
@ -2254,7 +2254,7 @@ float Kart::getVisualSkidOffset() const
float st = fabsf(m_skid_time);
if(st>m_kart_properties->getSkidVisualTime())
st = m_kart_properties->getSkidVisualTime();
f *= sqrt(st/m_kart_properties->getSkidVisualTime());
f *= st/m_kart_properties->getSkidVisualTime();
}
return f*m_kart_properties->getSkidVisual();