diff --git a/stepmania/src/Actor.h b/stepmania/src/Actor.h index a27db0cabc..cd53fa54f4 100644 --- a/stepmania/src/Actor.h +++ b/stepmania/src/Actor.h @@ -31,7 +31,7 @@ public: virtual Actor *Copy() const; void UnsubcribeAndClearCommands(); virtual void Reset(); - void LoadFromNode( const CString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const CString& sDir, const XNode* pNode ); static void SetBGMTime( float fTime, float fBeat ); static void SetBGMLight( int iLightNumber, float fCabinetLights ); diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 72c961706f..cd6f73f738 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -197,7 +197,20 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sDir, const XNode* pNode ) pReturn = ActorUtil::MakeActor( sNewPath ); if( pReturn == NULL ) goto all_done; - pReturn->LoadFromNode( sDir, pNode ); + + /* + * Hack: take attributes from the file loading the new actor, + * and load them on top of the new file. This way, you can do + * eg: + * + * file1.xml: + * file2.xml: + * + * Be sure to only run the low-level load, to pull in commands; + * don't reload the high-level actor, and don't rerun Init (which + * has already been run). + */ + pReturn->Actor::LoadFromNode( sDir, pNode ); } all_done: