diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index ad4fe39564..645cb6c452 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -192,7 +192,7 @@ void Actor::LoadFromNode( const CString& sDir, const XNode* pNode ) // - // Load commands + // Load command attributes // FOREACH_CONST_Attr( pNode, a ) { @@ -214,6 +214,28 @@ void Actor::LoadFromNode( const CString& sDir, const XNode* pNode ) AddCommand( sCmdName, apac ); } + // + // Load command elements + // + FOREACH_CONST_Child( pNode, c ) + { + CString sKeyName = c->m_sName; /* "OnCommand" */ + + if( sKeyName != "Command" ) + continue; /* not a command */ + + CString sName; + c->GetAttrValue( "Name", sName ); + CString sValue; + c->GetAttrValue( "Value", sValue ); + + THEME->EvaluateString( sName ); + THEME->EvaluateString( sValue ); + apActorCommands apac( new ActorCommands( sValue ) ); + + AddCommand( sName, apac ); + } + /* There's an InitCommand. Run it now. This can be used to eg. change Z to * modify draw order between BGAs in a Foreground. */ PlayCommand( "Init" );