Show skidding in history replay (still no skid marks or so,

but at least the visual rotation is shown).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10708 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2012-01-23 10:37:54 +00:00
parent fd4eb3fa5e
commit a7bdb6f99a
3 changed files with 9 additions and 1 deletions

View File

@ -2234,6 +2234,12 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz,
*/
} // updateGraphics
// ----------------------------------------------------------------------------
btQuaternion Kart::getVisualRotation() const
{
return getRotation() * btQuaternion(getVisualSkidOffset(), 0, 0);
} // getVisualRotation
// ----------------------------------------------------------------------------
/** Determines how much the graphics model of the kart should be rotated
* additionally (for skidding), depending on how long the kart has been

View File

@ -396,6 +396,8 @@ public:
* from the server information. */
void setSpeed (float s) {m_speed = s; }
// ------------------------------------------------------------------------
btQuaternion getVisualRotation() const ;
// ------------------------------------------------------------------------
/** Returns the slipstream object of this kart. */
const SlipStream* getSlipstream() const {return m_slipstream; }
// ------------------------------------------------------------------------

View File

@ -113,7 +113,7 @@ void History::updateSaving(float dt)
const Kart *kart = world->getKart(i);
m_all_controls[index+i] = kart->getControls();
m_all_xyz[index+i] = kart->getXYZ();
m_all_rotations[index+i] = kart->getRotation();
m_all_rotations[index+i] = kart->getVisualRotation();
} // for i
} // updateSaving