Removed unnecessary getMass function.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10344 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-12-04 21:24:07 +00:00
parent 46d4fe197c
commit c201876e2c
2 changed files with 5 additions and 10 deletions

View File

@ -256,7 +256,7 @@ void Kart::createPhysics()
// Set mass and inertia
// --------------------
float mass=getMass();
float mass = m_kart_properties->getMass();
// Position the chassis
// --------------------
@ -476,11 +476,11 @@ void Kart::capSpeed(float max_speed)
*/
void Kart::updatedWeight()
{
// getMass returns the mass increased by the attachment
float mass = m_kart_properties->getMass() + m_attachment->weightAdjust();
btVector3 inertia;
float m=getMass();
m_kart_chassis.calculateLocalInertia(m, inertia);
m_body->setMassProps(m, inertia);
m_kart_chassis.calculateLocalInertia(mass, inertia);
m_body->setMassProps(mass, inertia);
} // updatedWeight
//-----------------------------------------------------------------------------

View File

@ -337,11 +337,6 @@ public:
const video::SColor &getColor() const
{return m_kart_properties->getColor();}
// ------------------------------------------------------------------------
/** Returns the current mass of this kart, including any attachment this
* kart might have. */
float getMass() const { return m_kart_properties->getMass()
+ m_attachment->weightAdjust();}
// ------------------------------------------------------------------------
/** Returns the maximum engine power for this kart. */
float getMaxPower () const {return m_kart_properties->getMaxPower(); }
// ------------------------------------------------------------------------