Skip to content

Commit

Permalink
Allow karts to specifie a different sound effect for their engine; cl…
Browse files Browse the repository at this point in the history
…oses #1234
  • Loading branch information
konstin committed Mar 17, 2014
1 parent ce12ebe commit de50ea4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/karts/kart_properties.cpp
Expand Up @@ -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
Expand Down

0 comments on commit de50ea4

Please sign in to comment.