Added support for --material-debug command line option, which prints

the texture the kart is on and its slowdown related parameters.
This should help debugging incorrect slowdowns.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6341 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-10-26 09:29:44 +00:00
parent 3e4e4e00f1
commit 87f849184d
2 changed files with 13 additions and 0 deletions

View File

@ -831,6 +831,15 @@ void Kart::update(float dt)
MaxSpeed::setSlowdown(MaxSpeed::MS_DECREASE_TERRAIN,
material->getMaxSpeedFraction(),
material->getSlowDownTime() );
#ifdef DEBUG
if(UserConfigParams::m_material_debug)
{
printf("%s\tfraction %f\ttime %f.\n",
material->getTexFname().c_str(),
material->getMaxSpeedFraction(),
material->getSlowDownTime() );
}
#endif
}
} // if there is material

View File

@ -257,6 +257,10 @@ int handleCmdLine(int argc, char **argv)
{
UserConfigParams::m_track_debug=1;
}
else if(!strcmp(argv[i], "--material-debug"))
{
UserConfigParams::m_material_debug = true;
}
else if(!strcmp(argv[i], "--camera-debug"))
{
UserConfigParams::m_camera_debug=1;