diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 66ffcebccb..fd10b4e2b0 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -513,10 +513,8 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) CourseSortSongs( e->songSort, vpPossibleSongs, rnd ); - ASSERT( e->iChooseIndex >= -1 ); - if( e->iChooseIndex == -1 ) - pResolvedSong = vpPossibleSongs[RandomInt(0, vpPossibleSongs.size()-1)]; - else if( e->iChooseIndex < int(vpPossibleSongs.size()) ) + ASSERT( e->iChooseIndex >= 0 ); + if( e->iChooseIndex < int(vpPossibleSongs.size()) ) pResolvedSong = vpPossibleSongs[e->iChooseIndex]; else continue; @@ -674,7 +672,7 @@ bool Course::AllSongsAreFixed() const { FOREACH_CONST( CourseEntry, m_vEntries, e ) { - if( e->pSong == NULL ) + if( !e->IsFixedSong() ) return false; } return true; diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 6eae48c580..79420c3ebd 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -89,12 +89,7 @@ public: fGainSeconds = 0; } - bool IsRandomSong() const - { - return - iChooseIndex == -1 && - pSong == NULL; - } + bool IsFixedSong() const { return pSong != NULL; } RString GetTextDescription() const; int GetNumModChanges() const;