Removed unnecessary 'wheel width' parameter.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2195 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
46c5b8ab7d
commit
ce2e8bfbf5
@ -136,7 +136,7 @@ const std::string Challenge::getUnlockedMessage() const
|
||||
break;
|
||||
case UNLOCK_KART:
|
||||
const KartProperties *kp=kart_properties_manager->getKart(m_feature[n].name );
|
||||
snprintf(message, 127, _("New kart\n'%s'\nnow available"), kp->getName());
|
||||
snprintf(message, 127, _("New kart\n'%s'\nnow available"), kp->getName().c_str());
|
||||
break;
|
||||
} // switch
|
||||
unlocked_message += message;
|
||||
|
11
src/kart.cpp
11
src/kart.cpp
@ -176,12 +176,11 @@ void Kart::createPhysics(ssgEntity *obj)
|
||||
|
||||
// Add wheels
|
||||
// ----------
|
||||
float wheel_width = m_kart_properties->getWheelWidth();
|
||||
float wheel_radius = m_kart_properties->getWheelRadius();
|
||||
float suspension_rest = m_kart_properties->getSuspensionRest();
|
||||
Vec3 front_wheel = m_kart_properties->getFrontWheelConnection();
|
||||
if(front_wheel.getX()==STKConfig::UNDEFINED)
|
||||
front_wheel.setX(0.5f*kart_width-0.3f*wheel_width);
|
||||
front_wheel.setX(0.5f*kart_width);
|
||||
if(front_wheel.getY()==STKConfig::UNDEFINED)
|
||||
front_wheel.setY(0.5f*kart_length-wheel_radius);
|
||||
if(front_wheel.getZ()==STKConfig::UNDEFINED)
|
||||
@ -203,7 +202,7 @@ void Kart::createPhysics(ssgEntity *obj)
|
||||
// right rear wheel
|
||||
Vec3 rear_wheel = m_kart_properties->getRearWheelConnection();
|
||||
if(rear_wheel.getX()==STKConfig::UNDEFINED)
|
||||
rear_wheel.setX(0.5f*kart_width-0.3f*wheel_width);
|
||||
rear_wheel.setX(0.5f*kart_width);
|
||||
if(rear_wheel.getY()==STKConfig::UNDEFINED)
|
||||
rear_wheel.setY(-0.5f*kart_length+wheel_radius);
|
||||
if(rear_wheel.getZ()==STKConfig::UNDEFINED)
|
||||
@ -714,7 +713,7 @@ void Kart::draw()
|
||||
btVector3 wire_color(0.5f, 0.5f, 0.5f);
|
||||
world->getPhysics()->debugDraw(m, m_body->getCollisionShape(),
|
||||
wire_color);
|
||||
btCylinderShapeX wheelShape( btVector3(0.3f,
|
||||
btCylinderShapeX wheelShape( btVector3(0.1f,
|
||||
m_kart_properties->getWheelRadius(),
|
||||
m_kart_properties->getWheelRadius()));
|
||||
btVector3 wheelColor(1,0,0);
|
||||
@ -929,8 +928,8 @@ void Kart::processSkidMarks()
|
||||
assert(m_skidmark_left);
|
||||
assert(m_skidmark_right);
|
||||
const float threshold = 0.3f;
|
||||
const float ANGLE = 43.0f;
|
||||
const float LENGTH = 0.57f;
|
||||
//FIXME const float ANGLE = 43.0f;
|
||||
//FIXME const float LENGTH = 0.57f;
|
||||
bool skid_front = m_vehicle->getWheelInfo(0).m_skidInfo < threshold ||
|
||||
m_vehicle->getWheelInfo(1).m_skidInfo < threshold;
|
||||
bool skid_rear = m_vehicle->getWheelInfo(2).m_skidInfo < threshold ||
|
||||
|
@ -188,7 +188,6 @@ void KartProperties::getAllData(const lisp::Lisp* lisp)
|
||||
lisp->get("friction-slip", m_friction_slip );
|
||||
lisp->get("roll-influence", m_roll_influence );
|
||||
lisp->get("wheel-radius", m_wheel_radius );
|
||||
lisp->get("wheel-width", m_wheel_width );
|
||||
lisp->get("chassis-linear-damping", m_chassis_linear_damping );
|
||||
lisp->get("chassis-angular-damping", m_chassis_angular_damping );
|
||||
lisp->get("max-speed-reverse-ratio", m_max_speed_reverse_ratio );
|
||||
@ -254,7 +253,6 @@ void KartProperties::init_defaults()
|
||||
m_friction_slip = stk_config->m_friction_slip;
|
||||
m_roll_influence = stk_config->m_roll_influence;
|
||||
m_wheel_radius = stk_config->m_wheel_radius;
|
||||
m_wheel_width = stk_config->m_wheel_width;
|
||||
m_chassis_linear_damping = stk_config->m_chassis_linear_damping;
|
||||
m_chassis_angular_damping = stk_config->m_chassis_angular_damping;
|
||||
m_maximum_speed = stk_config->m_maximum_speed;
|
||||
|
@ -79,7 +79,6 @@ protected:
|
||||
float m_friction_slip;
|
||||
float m_roll_influence;
|
||||
float m_wheel_radius;
|
||||
float m_wheel_width;
|
||||
float m_chassis_linear_damping;
|
||||
float m_chassis_angular_damping;
|
||||
float m_maximum_speed;
|
||||
@ -153,7 +152,6 @@ public:
|
||||
float getFrictionSlip () const {return m_friction_slip; }
|
||||
float getRollInfluence () const {return m_roll_influence; }
|
||||
float getWheelRadius () const {return m_wheel_radius; }
|
||||
float getWheelWidth () const {return m_wheel_width; }
|
||||
float getChassisLinearDamping () const {return m_chassis_linear_damping; }
|
||||
float getChassisAngularDamping () const {return m_chassis_angular_damping; }
|
||||
float getMaximumSpeed () const {return m_maximum_speed; }
|
||||
|
@ -102,7 +102,6 @@ void STKConfig::load(const std::string filename)
|
||||
CHECK_NEG(m_friction_slip, "friction-slip" );
|
||||
CHECK_NEG(m_roll_influence, "roll-influence" );
|
||||
CHECK_NEG(m_wheel_radius, "wheel-radius" );
|
||||
CHECK_NEG(m_wheel_width, "wheel-width" );
|
||||
CHECK_NEG(m_chassis_linear_damping, "chassis-linear-damping" );
|
||||
CHECK_NEG(m_chassis_angular_damping, "chassis-angular-damping" );
|
||||
CHECK_NEG(m_maximum_speed, "maximum-speed" );
|
||||
@ -152,7 +151,7 @@ void STKConfig::init_defaults()
|
||||
//bullet physics data
|
||||
m_suspension_stiffness = m_wheel_damping_relaxation =
|
||||
m_wheel_damping_compression = m_friction_slip = m_roll_influence =
|
||||
m_wheel_radius = m_wheel_width = m_wheelie_power_boost =
|
||||
m_wheel_radius = m_wheelie_power_boost =
|
||||
m_chassis_linear_damping = m_chassis_angular_damping =
|
||||
m_maximum_speed = m_suspension_rest =
|
||||
m_max_speed_reverse_ratio = m_explosion_impulse = m_jump_velocity =
|
||||
|
Loading…
x
Reference in New Issue
Block a user