This commit is contained in:
Glenn Maynard
2006-10-09 05:18:17 +00:00
parent 612e2fa1df
commit 206f731d79
+13 -10
View File
@@ -334,22 +334,25 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor
if( ft == FT_Directory && sPath.Right(1) != "/" )
sPath += '/';
if( ft == FT_Directory )
{
RString sXMLPath = sPath + "default.xml";
if( DoesFileExist(sXMLPath) )
{
sPath = sXMLPath;
ft = FT_Xml;
}
}
RString sDir = Dirname( sPath );
switch( ft )
{
case FT_Directory:
{
sDir = sPath;
sPath = sDir + "default.xml";
if( !DoesFileExist(sPath) )
{
BGAnimation *pBGA = new BGAnimation;
pBGA->LoadFromAniDir( sDir );
return pBGA;
}
/* fall through */
BGAnimation *pBGA = new BGAnimation;
pBGA->LoadFromAniDir( sDir );
return pBGA;
}
case FT_Xml:
{