Allow karts to specifie a different sound effect for their engine; closes #1234

This commit is contained in:
konstin 2014-03-17 17:01:34 +01:00
parent ce12ebe9ce
commit de50ea46e8

View File

@ -560,9 +560,17 @@ void KartProperties::getAllData(const XMLNode * root)
else if (s == "small") m_engine_sfx_type = "engine_small";
else
{
Log::warn("[KartProperties]", "Kart '%s' has invalid engine '%s'.",
m_name.c_str(), s.c_str());
m_engine_sfx_type = "engine_small";
if (sfx_manager->soundExist(s))
{
m_engine_sfx_type = s;
}
else
{
Log::error("[KartProperties]",
"Kart '%s' has an invalid engine '%s'.",
m_name.c_str(), s.c_str());
m_engine_sfx_type = "engine_small";
}
}
#ifdef WILL_BE_ENABLED_ONCE_DONE_PROPERLY