From d87cfccfb91c480ee03d4fe5edeee43bef0bfd59 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 11 Oct 2005 00:48:27 +0000 Subject: [PATCH] simplify --- stepmania/src/ActorUtil.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 4734a8c9f4..d7d77e0dc0 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -247,22 +247,20 @@ Actor* ActorUtil::MakeActor( const CString &sPath ) sDir += '/'; CString sXml = sDir + "default.xml"; - if( DoesFileExist(sXml) ) - { - XNode xml; - if( !xml.LoadFromFile(sXml) ) - { - // XNode will warn about the error - return new Actor; - } - return LoadFromActorFile( sDir, &xml ); - } - else + if( !DoesFileExist(sXml) ) { BGAnimation *pBGA = new BGAnimation; pBGA->LoadFromAniDir( sDir ); return pBGA; } + + XNode xml; + if( !xml.LoadFromFile(sXml) ) + { + // XNode will warn about the error + return new Actor; + } + return LoadFromActorFile( sDir, &xml ); } case FT_Xml: {