Removed hardlock on gnu being the only kart without skid marks and smoke; now any kart with no wheels doesn't have skid marks or smoke.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9204 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
computerfreak97 2011-07-09 03:32:29 +00:00
parent 35a3e78b94
commit cdee7461a3
3 changed files with 5 additions and 2 deletions

View File

@ -80,7 +80,7 @@ void SkidMarks::reset()
void SkidMarks::update(float dt)
{
//if the kart is gnu, then dont skid because he floats!
if (m_kart.getKartProperties()->getNonTranslatedName() != "Gnu") {
if (m_kart.isWheeless() == false) {
float f = dt/stk_config->m_skid_fadeout_time*m_start_alpha;
for(unsigned int i=0; i<m_left.size(); i++)
{

View File

@ -1744,7 +1744,8 @@ void Kart::loadData(RaceManager::KartType type, bool is_first_kart,
createPhysics();
// Attach Particle System
if (UserConfigParams::m_graphical_effects)
if (UserConfigParams::m_graphical_effects && !isWheeless())
{
try
{
@ -1761,6 +1762,7 @@ void Kart::loadData(RaceManager::KartType type, bool is_first_kart,
std::cerr << "[Kart::loadData] " << e.what() << std::endl;
}
}
if (type == RaceManager::KT_PLAYER && UserConfigParams::m_weather_effects &&
track->getSkyParticles() != NULL)

View File

@ -430,6 +430,7 @@ public:
/** Returns if the kart is currently being squashed. */
bool isSquashed() const { return m_squash_time >0; }
// ------------------------------------------------------------------------
bool isWheeless() const {return m_kart_model->getWheelModel(0)==NULL;}
}; // Kart