diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 88bc879791..643f896044 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -713,11 +713,14 @@ bool Course::AllSongsAreFixed() const return true; } -const Style *Course::GetCourseStyle( const Game *pGame ) const +const Style *Course::GetCourseStyle( const Game *pGame, int iNumPlayers ) const { - for( int s=0; pGame->m_apStyles[s]; ++s ) + vector vpStyles; + GAMEMAN->GetCompatibleStyles( pGame, iNumPlayers, vpStyles ); + + for( int s=0; s < (int) vpStyles.size(); ++s ) { - const Style *pStyle = pGame->m_apStyles[s]; + const Style *pStyle = vpStyles[s]; FOREACHS_CONST( RString, m_setStyles, style ) { if( !style->CompareNoCase(pStyle->m_szName) ) diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index c91c648295..13511f146a 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -124,7 +124,7 @@ public: int GetMeter( StepsType st, CourseDifficulty cd=Difficulty_Medium ) const; bool HasMods() const; bool AllSongsAreFixed() const; - const Style *GetCourseStyle( const Game *pGame ) const; + const Style *GetCourseStyle( const Game *pGame, int iNumPlayers ) const; int GetEstimatedNumStages() const { return m_vEntries.size(); } bool IsPlayableIn( StepsType st ) const; diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 8b3906727f..14d05de8f4 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -998,7 +998,7 @@ void MusicWheel::SetOpenGroup( RString group ) /* If AUTO_SET_STYLE, hide courses that prefer a style that isn't available. */ if( d.m_Type == TYPE_COURSE && CommonMetrics::AUTO_SET_STYLE ) { - const Style *pStyle = d.m_pCourse->GetCourseStyle( GAMESTATE->m_pCurGame ); + const Style *pStyle = d.m_pCourse->GetCourseStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined() ); if( pStyle ) { if( find( vpPossibleStyles.begin(), vpPossibleStyles.end(), pStyle ) == vpPossibleStyles.end() ) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 95538e0205..607048254b 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -894,7 +894,7 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input ) /* Now that Steps have been chosen, set a Style that can play them. */ const Style *pStyle = NULL; if( GAMESTATE->IsCourseMode() ) - pStyle = GAMESTATE->m_pCurCourse->GetCourseStyle( GAMESTATE->m_pCurGame ); + pStyle = GAMESTATE->m_pCurCourse->GetCourseStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined() ); if( pStyle == NULL ) { StepsType stCurrent; @@ -1179,7 +1179,7 @@ void ScreenSelectMusic::AfterMusicChange() const Course *pCourse = m_MusicWheel.GetSelectedCourse(); const Style *pStyle = NULL; if( CommonMetrics::AUTO_SET_STYLE ) - pStyle = pCourse->GetCourseStyle( GAMESTATE->m_pCurGame ); + pStyle = pCourse->GetCourseStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined() ); if( pStyle == NULL ) pStyle = GAMESTATE->GetCurrentStyle(); pCourse->GetTrails( m_vpTrails, pStyle->m_StepsType );