don't try to load sound if transition path is xml
This commit is contained in:
@@ -26,8 +26,10 @@ void Transition::Load( CString sBGAniDir )
|
|||||||
m_State = waiting;
|
m_State = waiting;
|
||||||
|
|
||||||
// load sound from file specified by ini, or use the first sound in the directory
|
// load sound from file specified by ini, or use the first sound in the directory
|
||||||
|
if( IsADirectory(sBGAniDir) )
|
||||||
|
{
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
ini.ReadFile( sBGAniDir+"BGAnimation.ini" );
|
ini.ReadFile( sBGAniDir+"/BGAnimation.ini" );
|
||||||
|
|
||||||
CString sSoundFileName;
|
CString sSoundFileName;
|
||||||
if( ini.GetValue("BGAnimation","Sound",sSoundFileName) )
|
if( ini.GetValue("BGAnimation","Sound",sSoundFileName) )
|
||||||
@@ -42,6 +44,7 @@ void Transition::Load( CString sBGAniDir )
|
|||||||
m_sound.Load( sBGAniDir );
|
m_sound.Load( sBGAniDir );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Transition::Update( float fDeltaTime )
|
void Transition::Update( float fDeltaTime )
|
||||||
|
|||||||
Reference in New Issue
Block a user