diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 3407530ffa..345e070453 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -833,6 +833,7 @@ void Song::GetSteps( int iMeterHigh, const CString &sDescription, bool bIncludeAutoGen, + unsigned uHash, int iMaxToGet ) const { @@ -852,6 +853,8 @@ void Song::GetSteps( continue; if( sDescription.size() && sDescription != pSteps->GetDescription() ) continue; + if( uHash != 0 && uHash != pSteps->GetHash() ) + continue; if( !bIncludeAutoGen && pSteps->IsAutogen() ) continue; @@ -872,11 +875,12 @@ Steps* Song::GetSteps( int iMeterLow, int iMeterHigh, const CString &sDescription, + unsigned uHash, bool bIncludeAutoGen ) const { vector vpSteps; - GetSteps( vpSteps, st, dc, iMeterLow, iMeterHigh, sDescription, bIncludeAutoGen, 1 ); // get max 1 + GetSteps( vpSteps, st, dc, iMeterLow, iMeterHigh, sDescription, bIncludeAutoGen, uHash, 1 ); // get max 1 if( vpSteps.empty() ) return NULL; else diff --git a/stepmania/src/StepsUtil.cpp b/stepmania/src/StepsUtil.cpp index df1b5cccff..767b3684fd 100644 --- a/stepmania/src/StepsUtil.cpp +++ b/stepmania/src/StepsUtil.cpp @@ -157,11 +157,11 @@ Steps *StepsID::ToSteps( const Song *p, bool bAllowNull, bool bUseCache ) const Steps *ret = NULL; if( dc == DIFFICULTY_EDIT ) { - ret = p->GetSteps( st, dc, -1, -1, sDescription, true ); + ret = p->GetSteps( st, dc, -1, -1, sDescription, uHash, true ); } else { - ret = p->GetSteps( st, dc, -1, -1, "", true ); + ret = p->GetSteps( st, dc, -1, -1, "", 0, true ); } if( !bAllowNull ) diff --git a/stepmania/src/song.h b/stepmania/src/song.h index 3761ab8117..51dccda1d5 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -181,6 +181,7 @@ public: int iMeterHigh = -1, const CString &sDescription = "", bool bIncludeAutoGen = true, + unsigned uHash = 0, int iMaxToGet = -1 ) const; Steps* GetSteps( @@ -189,6 +190,7 @@ public: int iMeterLow = -1, int iMeterHigh = -1, const CString &sDescription = "", + unsigned uHash = 0, bool bIncludeAutoGen = true ) const; Steps* GetStepsByDifficulty( StepsType st, Difficulty dc, bool bIncludeAutoGen = true ) const;