diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 7fa160c148..bfe2b9d352 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -1111,6 +1111,14 @@ bool Course::IsRanking() const return false; } +void Course::GetAllCachedTrails( vector &out ) +{ + FOREACH_StepsType( st ) + FOREACH_ShownCourseDifficulty( cd ) + if( m_TrailCacheValid[st][cd] && !m_TrailCacheNull[st][cd] ) + out.push_back( &m_TrailCache[st][cd] ); +} + /* * (c) 2001-2004 Chris Danford, Glenn Maynard * All rights reserved. diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index 4af5b585cc..9a895088a9 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -149,6 +149,8 @@ public: /* Call when a Song or its Steps are deleted/changed. */ void Invalidate( Song *pStaleSong ); + void GetAllCachedTrails( vector &out ); + private: bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;