diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 5709f9def9..ad28523e49 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -651,7 +651,7 @@ RageColor Course::GetColor() const break; case PrefsManager::COURSE_SORT_METER: - if (GetMeter() > 100) + if ( !IsFixed() ) return RageColor(0,0,1,1); // blue if (GetMeter() > 8.5) return RageColor(1,0,0,1); // red @@ -662,7 +662,7 @@ RageColor Course::GetColor() const return RageColor(0,1,0,1); // green case PrefsManager::COURSE_SORT_METER_SUM: - if (SortOrder_TotalDifficulty > 100000) + if ( !IsFixed() ) return RageColor(0,0,1,1); // blue if (SortOrder_TotalDifficulty >= 40) return RageColor(1,0,0,1); // red @@ -686,6 +686,18 @@ RageColor Course::GetColor() const } } +bool Course::IsFixed() const +{ + for(unsigned i = 0; i < m_entries.size(); i++) + { + if ( m_entries[i].type == COURSE_ENTRY_FIXED ) + continue; + + return false; + } + + return true; +} Difficulty Course::GetDifficulty( const Info &stage ) const { diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 88f4b761c1..5f8c66f6e1 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -123,6 +123,8 @@ public: PlayMode GetPlayMode() const; float GetMeter( int Difficult = -1 ) const; + bool IsFixed() const; + void LoadFromCRSFile( CString sPath ); void Save(); void AutogenEndlessFromGroup( CString sGroupName, vector &apSongsInGroup );