This commit is contained in:
Glenn Maynard
2005-10-11 00:48:27 +00:00
parent 92585fcaa9
commit d87cfccfb9
+9 -11
View File
@@ -247,22 +247,20 @@ Actor* ActorUtil::MakeActor( const CString &sPath )
sDir += '/'; sDir += '/';
CString sXml = sDir + "default.xml"; CString sXml = sDir + "default.xml";
if( DoesFileExist(sXml) ) if( !DoesFileExist(sXml) )
{
XNode xml;
if( !xml.LoadFromFile(sXml) )
{
// XNode will warn about the error
return new Actor;
}
return LoadFromActorFile( sDir, &xml );
}
else
{ {
BGAnimation *pBGA = new BGAnimation; BGAnimation *pBGA = new BGAnimation;
pBGA->LoadFromAniDir( sDir ); pBGA->LoadFromAniDir( sDir );
return pBGA; return pBGA;
} }
XNode xml;
if( !xml.LoadFromFile(sXml) )
{
// XNode will warn about the error
return new Actor;
}
return LoadFromActorFile( sDir, &xml );
} }
case FT_Xml: case FT_Xml:
{ {