diff --git a/stepmania/src/ScreenBranch.cpp b/stepmania/src/ScreenBranch.cpp index a07de86fb9..77b61a9ee0 100644 --- a/stepmania/src/ScreenBranch.cpp +++ b/stepmania/src/ScreenBranch.cpp @@ -19,6 +19,7 @@ #include "Grade.h" #include "GameState.h" #include "StageStats.h" +#include "SongManager.h" #define CHOICES THEME->GetMetric (m_sName,"Choices") #define CONDITION(choice) THEME->GetMetric (m_sName,"Condition"+choice) @@ -34,6 +35,16 @@ bool EvaluateCondition( CString sCondition ) CStringArray as; split( sCondition, ",", as, false ); + if( as.size()==3 && as[0].CompareNoCase("song")==0 ) + { + const CString &sOp = as[1]; + const CString &path = as[2]; + + const Song *s = SONGMAN->FindSong( path ); + if( sOp == "=" ) + return s == GAMESTATE->m_pCurSong; + } + if( as.size()==3 && as[0].CompareNoCase("topgrade")==0 ) { Grade top_grade = GRADE_FAILED;