load default.xml instead of BGAnimation.ini if available
This commit is contained in:
@@ -286,11 +286,24 @@ Actor* MakeActor( const RageTextureID &ID )
|
|||||||
}
|
}
|
||||||
/* Do this last, to avoid the IsADirectory in most cases. */
|
/* Do this last, to avoid the IsADirectory in most cases. */
|
||||||
else if( IsADirectory(ID.filename) )
|
else if( IsADirectory(ID.filename) )
|
||||||
|
{
|
||||||
|
const CString& sDir = ID.filename;
|
||||||
|
CString sIni = sDir + "BGAnimation.ini";
|
||||||
|
CString sXml = sDir + "default.xml";
|
||||||
|
|
||||||
|
if( DoesFileExist(sXml) )
|
||||||
|
{
|
||||||
|
XNode xml;
|
||||||
|
xml.LoadFromFile( sXml );
|
||||||
|
return LoadFromActorFile( sDir, xml );
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
BGAnimation *pBGA = new BGAnimation;
|
BGAnimation *pBGA = new BGAnimation;
|
||||||
pBGA->LoadFromAniDir( ID.filename );
|
pBGA->LoadFromAniDir( sDir );
|
||||||
return pBGA;
|
return pBGA;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RageException::Throw("File \"%s\" has unknown type, \"%s\"",
|
RageException::Throw("File \"%s\" has unknown type, \"%s\"",
|
||||||
|
|||||||
Reference in New Issue
Block a user