attempt to load .sm files if loading .ssc files fails

This commit is contained in:
AJ Kelly
2011-03-16 16:33:27 -05:00
parent 9aa78d3c23
commit cbb32635d5
3 changed files with 30 additions and 6 deletions
+9 -2
View File
@@ -223,8 +223,15 @@ bool Song::LoadFromSongDir( RString sDir )
if( bUseCache )
{
// LOG->Trace( "Loading '%s' from cache file '%s'.", m_sSongDir.c_str(), GetCacheFilePath().c_str() );
SSCLoader::LoadFromSSCFile( sCacheFilePath, *this, true );
SSCLoader::TidyUpData( *this, true );
bool bLoadedFromSSC = SSCLoader::LoadFromSSCFile( sCacheFilePath, *this, true );
if( bLoadedFromSSC )
SSCLoader::TidyUpData( *this, true );
else
{
// load from .sm
SMLoader::LoadFromSMFile( sCacheFilePath, *this, true );
SMLoader::TidyUpData( *this, true );
}
}
else
{