course 2p fixes
This commit is contained in:
@@ -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<const Style*> 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) )
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() )
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user