Add minor error checking

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7202 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-12-31 02:41:11 +00:00
parent 7a6fbbde51
commit ff33f8782f

View File

@ -450,7 +450,13 @@ void KartProperties::getAllData(const XMLNode * root)
std::string s;
sounds_node->get("engine", &s);
if (s == "large") m_engine_sfx_type = "engine_large";
else if (s== "small") m_engine_sfx_type = "engine_small";
else if (s == "small") m_engine_sfx_type = "engine_small";
else
{
std::cerr << "[KartProperties::getAllData()] WARNING : Kart " << temp_name
<< " has invalid engine : " << s << "\n";
m_engine_sfx_type = "engine_small";
}
#ifdef WILL_BE_ENABLED_ONCE_DONE_PROPERLY
// Load custom kart SFX files (TODO: enable back when it's implemented properly)