This commit is contained in:
Glenn Maynard
2003-12-29 23:02:27 +00:00
parent 5c26ef5753
commit 163ae62eaa
+5 -8
View File
@@ -1028,14 +1028,11 @@ void Song::AddAutoGenNotes()
for( StepsType nt=(StepsType)0; nt<NUM_STEPS_TYPES; nt=(StepsType)(nt+1) ) for( StepsType nt=(StepsType)0; nt<NUM_STEPS_TYPES; nt=(StepsType)(nt+1) )
{ {
vector<Steps*> apNotes; if( GetStepsByDifficulty( nt, DIFFICULTY_INVALID, false ) == NULL )
this->GetSteps( apNotes, nt ); continue;
if(apNotes.empty() || apNotes[0]->IsAutogen()) const int iNumTracks = GAMEMAN->NotesTypeToNumTracks(nt);
continue; /* can't autogen from other autogen */ const int iTrackDifference = abs(iNumTracks-iNumTracksOfMissing);
int iNumTracks = GAMEMAN->NotesTypeToNumTracks(nt);
int iTrackDifference = abs(iNumTracks-iNumTracksOfMissing);
if( iTrackDifference < iBestTrackDifference ) if( iTrackDifference < iBestTrackDifference )
{ {
ntBestMatch = nt; ntBestMatch = nt;
@@ -1054,7 +1051,7 @@ void Song::AutoGen( StepsType ntTo, StepsType ntFrom )
for( unsigned int j=0; j<m_apNotes.size(); j++ ) for( unsigned int j=0; j<m_apNotes.size(); j++ )
{ {
Steps* pOriginalNotes = m_apNotes[j]; const Steps* pOriginalNotes = m_apNotes[j];
if( pOriginalNotes->m_StepsType == ntFrom ) if( pOriginalNotes->m_StepsType == ntFrom )
{ {
Steps* pNewNotes = new Steps; Steps* pNewNotes = new Steps;